@@ -70,58 +70,6 @@ fn test_clean_branches_run_function_actual_delete() {
7070 let _ = std:: env:: set_current_dir ( & original_dir) ;
7171}
7272
73- #[ test]
74- fn test_clean_branches_run_function_with_branches_to_delete ( ) {
75- let repo = repo_with_merged_branch ( "test-branch" , "master" ) ;
76- let original_dir = std:: env:: current_dir ( ) . unwrap ( ) ;
77-
78- // Switch back to master to ensure the test branch is merged
79- repo. checkout_branch ( "master" ) ;
80-
81- // Change to repo directory and run the function directly
82- std:: env:: set_current_dir ( repo. path ( ) ) . unwrap ( ) ;
83-
84- let cmd = CleanBranchesCommand :: new ( true ) ;
85- let result = cmd. execute ( ) ;
86- assert ! ( result. is_ok( ) ) ;
87-
88- // Restore original directory
89- let _ = std:: env:: set_current_dir ( & original_dir) ;
90- }
91-
92- #[ test]
93- fn test_clean_branches_run_function_non_dry_run_with_branches ( ) {
94- if !should_run_destructive_tests ( ) {
95- return ;
96- }
97-
98- let repo = repo_with_merged_branch ( "test-non-dry" , "master" ) ;
99- let original_dir = std:: env:: current_dir ( ) . unwrap ( ) ;
100-
101- // Switch back to master to ensure the test branch is merged
102- repo. checkout_branch ( "master" ) ;
103-
104- // Change to repo directory and run the function directly
105- std:: env:: set_current_dir ( repo. path ( ) ) . unwrap ( ) ;
106-
107- // Set non-interactive mode for this test
108- unsafe {
109- std:: env:: set_var ( "GIT_X_NON_INTERACTIVE" , "1" ) ;
110- }
111-
112- let cmd = CleanBranchesCommand :: new ( false ) ;
113- let result = cmd. execute ( ) ;
114- assert ! ( result. is_ok( ) ) ;
115-
116- // Clean up environment variable
117- unsafe {
118- std:: env:: remove_var ( "GIT_X_NON_INTERACTIVE" ) ;
119- }
120-
121- // Restore original directory
122- let _ = std:: env:: set_current_dir ( & original_dir) ;
123- }
124-
12573#[ test]
12674fn test_clean_branches_run_function_no_branches ( ) {
12775 let repo = common:: basic_repo ( ) ;
@@ -169,12 +117,3 @@ fn test_clean_branches_actually_deletes_branch() {
169117 let stdout_after = String :: from_utf8_lossy ( & output_after. stdout ) ;
170118 assert ! ( !stdout_after. contains( "feature/cleanup" ) ) ;
171119}
172-
173- #[ test]
174- fn test_clean_branches_command_traits ( ) {
175- let cmd = CleanBranchesCommand :: new ( true ) ;
176-
177- // Test Command trait implementation
178- assert_eq ! ( cmd. name( ) , "clean-branches" ) ;
179- assert_eq ! ( cmd. description( ) , "Delete merged branches" ) ;
180- }
0 commit comments