Skip to content

Commit 9a457e1

Browse files
committed
#55 add invalid release test
1 parent f94e74e commit 9a457e1

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

update_test.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,14 @@ func TestNotExistingCommandPath(t *testing.T) {
110110
assert.Contains(t, err.Error(), "file may not exist")
111111
}
112112

113+
func TestUpdateToInvalidRelease(t *testing.T) {
114+
updater, err := NewUpdater(Config{Source: &MockSource{}})
115+
require.NoError(t, err)
116+
117+
err = updater.UpdateTo(context.Background(), nil, "", "")
118+
assert.ErrorIs(t, err, ErrInvalidRelease)
119+
}
120+
113121
func TestNoReleaseFoundForUpdate(t *testing.T) {
114122
finalVersion := "1.0.0"
115123
fake := filepath.FromSlash("./testdata/fake-executable")

0 commit comments

Comments
 (0)