Skip to content

Commit 8da3983

Browse files
committed
assert for runAdd err in test
1 parent ae84c7d commit 8da3983

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

cmd/add_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,9 +542,10 @@ func TestAdd_RejectsExistingBranchInStack(t *testing.T) {
542542
defer restore()
543543

544544
cfg, outR, errR := config.NewTestConfig()
545-
runAdd(cfg, &addOptions{}, []string{"taken-branch"})
545+
err := runAdd(cfg, &addOptions{}, []string{"taken-branch"})
546546
output := collectOutput(cfg, outR, errR)
547547

548+
assert.ErrorIs(t, err, ErrInvalidArgs)
548549
assert.Contains(t, output, "already exists in the stack")
549550
}
550551

0 commit comments

Comments
 (0)