diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2021-06-07 07:27:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-07 07:27:09 +0200 |
commit | 3607f79d7869046d919fed05a21b55b6e61df1fa (patch) | |
tree | 9a176a4d5b67ac3a81ae210e9164d81959221ce0 /services/release | |
parent | 51775f65bc933843199320b040186703a2bb9f51 (diff) | |
download | gitea-3607f79d7869046d919fed05a21b55b6e61df1fa.tar.gz gitea-3607f79d7869046d919fed05a21b55b6e61df1fa.zip |
Fixed assert statements. (#16089)
Diffstat (limited to 'services/release')
-rw-r--r-- | services/release/release_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
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) { |