Skip to content

Commit 9ae36a3

Browse files
committed
new_branch: add delete branch as teardown in test
1 parent 2ee0a11 commit 9ae36a3

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

cmd/new_branch_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func TestNewBranch(t *testing.T) {
4040
"project": "Group2/project12",
4141
"ref": "master",
4242
},
43-
args: []string{"release-x"},
43+
args: []string{"release-xy"},
4444
expect: pass,
4545
},
4646
{
@@ -63,7 +63,10 @@ func TestNewBranch(t *testing.T) {
6363
require.Equal(t, tc.expect, execResult,
6464
printFlagsTable(tc.flagsMap, stdout))
6565
if tc.expect == pass {
66-
require.Contains(t, stdout, tc.flagsMap["name"], stdout)
66+
require.Contains(t, stdout, tc.args[0], stdout)
67+
if err := deleteBranch(tc.flagsMap["project"], tc.args[0]); err != nil {
68+
tInfo(err)
69+
}
6770
}
6871
})
6972
}

0 commit comments

Comments
 (0)