File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -156,6 +156,7 @@ where
156156#[ cfg( test) ]
157157mod tests {
158158 use crate :: config:: { RepositoryConfig , default_timeout, deserialize_config} ;
159+ use std:: path:: Path ;
159160 use std:: { collections:: BTreeMap , time:: Duration } ;
160161
161162 #[ test]
@@ -278,6 +279,15 @@ approved = ["foo"]
278279 load_config ( content) ;
279280 }
280281
282+ #[ test]
283+ fn load_example_config ( ) {
284+ let path = Path :: new ( env ! ( "CARGO_MANIFEST_DIR" ) ) . join ( "rust-bors.example.toml" ) ;
285+ let config = std:: fs:: read_to_string ( path)
286+ . expect ( "Cannot load example bors config from repository root" ) ;
287+ deserialize_config ( & config)
288+ . expect ( "Cannot deserialize example bors config from `rust-bors.example.toml`" ) ;
289+ }
290+
281291 fn load_config ( config : & str ) -> RepositoryConfig {
282292 deserialize_config ( config) . expect ( "Cannot deserialize repository config" )
283293 }
You can’t perform that action at this time.
0 commit comments