From 3607f79d7869046d919fed05a21b55b6e61df1fa Mon Sep 17 00:00:00 2001 From: KN4CK3R Date: Mon, 7 Jun 2021 07:27:09 +0200 Subject: Fixed assert statements. (#16089) --- services/release/release_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'services/release/release_test.go') diff --git a/services/release/release_test.go b/services/release/release_test.go index 102e3d7e0c..085be55cb4 100644 --- a/services/release/release_test.go +++ b/services/release/release_test.go @@ -221,7 +221,7 @@ func TestRelease_Update(t *testing.T) { assert.NoError(t, UpdateRelease(user, gitRepo, release, []string{attach.UUID}, nil, nil)) assert.NoError(t, models.GetReleaseAttachments(release)) - assert.EqualValues(t, 1, len(release.Attachments)) + assert.Len(t, release.Attachments, 1) assert.EqualValues(t, attach.UUID, release.Attachments[0].UUID) assert.EqualValues(t, release.ID, release.Attachments[0].ReleaseID) assert.EqualValues(t, attach.Name, release.Attachments[0].Name) @@ -232,7 +232,7 @@ func TestRelease_Update(t *testing.T) { })) release.Attachments = nil assert.NoError(t, models.GetReleaseAttachments(release)) - assert.EqualValues(t, 1, len(release.Attachments)) + assert.Len(t, release.Attachments, 1) assert.EqualValues(t, attach.UUID, release.Attachments[0].UUID) assert.EqualValues(t, release.ID, release.Attachments[0].ReleaseID) assert.EqualValues(t, "test2.txt", release.Attachments[0].Name) @@ -241,7 +241,7 @@ func TestRelease_Update(t *testing.T) { assert.NoError(t, UpdateRelease(user, gitRepo, release, nil, []string{attach.UUID}, nil)) release.Attachments = nil assert.NoError(t, models.GetReleaseAttachments(release)) - assert.EqualValues(t, 0, len(release.Attachments)) + assert.Empty(t, release.Attachments) } func TestRelease_createTag(t *testing.T) { -- cgit v1.2.3