@@ -54,22 +54,20 @@ fn test_for_file() -> Result<(), Box<dyn Error>> {
5454
5555#[ test]
5656fn test_for_file_same_team_multiple_ownerships ( ) -> Result < ( ) , Box < dyn Error > > {
57- let expected_output = r#"
58- Team: Payroll
59- Team YML: config/teams/payroll.yml
60- Description:
61- - Owner annotation at the top of the file
62- - Owner defined in `javascript/packages/PayrollFlow/package.json` with implicity owned glob: `javascript/packages/PayrollFlow/**/**`
63- "#
64- . trim ( ) ;
6557 Command :: cargo_bin ( "codeowners" ) ?
6658 . arg ( "--project-root" )
6759 . arg ( "tests/fixtures/valid_project" )
6860 . arg ( "for-file" )
6961 . arg ( "javascript/packages/PayrollFlow/index.tsx" )
7062 . assert ( )
7163 . success ( )
72- . stdout ( predicate:: str:: contains ( expected_output) ) ;
64+ . stdout ( predicate:: eq ( indoc ! { "
65+ Team: Payroll
66+ Team YML: config/teams/payroll.yml
67+ Description:
68+ - Owner annotation at the top of the file
69+ - Owner defined in `javascript/packages/PayrollFlow/package.json` with implicity owned glob: `javascript/packages/PayrollFlow/**/**`
70+ " } ) ) ;
7371 Ok ( ( ) )
7472}
7573
@@ -82,8 +80,13 @@ fn test_for_file_with_2_ownerships() -> Result<(), Box<dyn Error>> {
8280 . arg ( "javascript/packages/PayrollFlow/index.tsx" )
8381 . assert ( )
8482 . success ( )
85- . stdout ( predicate:: str:: contains ( "Team: Payroll" ) )
86- . stdout ( predicate:: str:: contains ( "Team YML: config/teams/payroll.yml" ) ) ;
83+ . stdout ( predicate:: eq ( indoc ! { "
84+ Team: Payroll
85+ Team YML: config/teams/payroll.yml
86+ Description:
87+ - Owner annotation at the top of the file
88+ - Owner defined in `javascript/packages/PayrollFlow/package.json` with implicity owned glob: `javascript/packages/PayrollFlow/**/**`
89+ " } ) ) ;
8790
8891 Ok ( ( ) )
8992}
0 commit comments