fix(master): review fixes for newer-tag suggestions (#11)
This commit is contained in:
@@ -247,6 +247,21 @@ func TestServicePage_NewerTagAlreadyListedIsNotAppendedTwice(t *testing.T) {
|
||||
assert.Equal(t, 1, strings.Count(body, `name="version"`))
|
||||
}
|
||||
|
||||
func TestServicePage_PinnedRowOfTheNewerTagDoesNotHideThePlainRow(t *testing.T) {
|
||||
srv, store, _, _, _ := newTestEnv(t)
|
||||
store.services[0].ImageRepo = sluskRepo
|
||||
store.services[0].NewerRef = sluskRepo + ":1.5.0"
|
||||
store.versions = []model.ImageVersion{
|
||||
{ID: 31, Repo: sluskRepo, Tag: "1.5.0", Digest: "sha256:d", Source: "poll"},
|
||||
{ID: 32, Repo: sluskRepo, Tag: "1.5.0", Source: "tags"},
|
||||
}
|
||||
|
||||
_, body := get(t, srv, "/services/1")
|
||||
|
||||
assert.Equal(t, 2, strings.Count(body, `name="version"`))
|
||||
assert.Contains(t, body, `<input type="hidden" name="version" value="32">`)
|
||||
}
|
||||
|
||||
func TestServicePage_NoNewerTagRowWithoutSuggestion(t *testing.T) {
|
||||
srv, _, _, _, _ := newTestEnv(t)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user