File tree Expand file tree Collapse file tree
guards/github-guard/rust-guard/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1113,6 +1113,22 @@ mod tests {
11131113 assert ! ( matches!( inferred, Cow :: Borrowed ( "octocat/hello-world" ) ) ) ;
11141114 }
11151115
1116+ #[ test]
1117+ fn infer_scope_for_baseline_borrows_github_scope_for_repo_creation ( ) {
1118+ let tool_args = json ! ( { } ) ;
1119+ let inferred = infer_scope_for_baseline ( "create_repository" , & tool_args, "" ) ;
1120+
1121+ assert ! ( matches!( inferred, Cow :: Borrowed ( scope_names:: GITHUB ) ) ) ;
1122+ }
1123+
1124+ #[ test]
1125+ fn infer_scope_for_baseline_borrows_empty_scope_for_other_tools ( ) {
1126+ let tool_args = json ! ( { } ) ;
1127+ let inferred = infer_scope_for_baseline ( "get_file_contents" , & tool_args, "" ) ;
1128+
1129+ assert ! ( matches!( inferred, Cow :: Borrowed ( "" ) ) ) ;
1130+ }
1131+
11161132 #[ test]
11171133 fn search_code_baseline_preserves_scoped_integrity ( ) {
11181134 let ctx = PolicyContext {
You can’t perform that action at this time.
0 commit comments