summaryrefslogtreecommitdiffstats
path: root/services/release/release_test.go
diff options
context:
space:
mode:
author赵智超 <1012112796@qq.com>2020-07-30 03:20:54 +0800
committerGitHub <noreply@github.com>2020-07-29 15:20:54 -0400
commit1f12dc8e8862da8546fd9d984abdc7f69dd95f11 (patch)
treec90da9326eb89dc57cf7e9625fe34542a88b41b4 /services/release/release_test.go
parent2fd78c151e0e49db113078095f1d9e8c7478e828 (diff)
downloadgitea-1f12dc8e8862da8546fd9d984abdc7f69dd95f11.tar.gz
gitea-1f12dc8e8862da8546fd9d984abdc7f69dd95f11.zip
Add action feed for new release (#12324)
* Add action feed for new release Signed-off-by: a1012112796 <1012112796@qq.com> * fix lint * Apply suggestions from code review * Add ReleaseID to the action table * Remove error message * Fold the attachments download list * remove attchment download list * simplify code * fix create release from existing tag * simplify ui * translation change * fix test Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'services/release/release_test.go')
-rw-r--r--services/release/release_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/services/release/release_test.go b/services/release/release_test.go
index d5673b73b8..f50fca71ec 100644
--- a/services/release/release_test.go
+++ b/services/release/release_test.go
@@ -131,7 +131,7 @@ func TestRelease_Update(t *testing.T) {
releaseCreatedUnix := release.CreatedUnix
time.Sleep(2 * time.Second) // sleep 2 seconds to ensure a different timestamp
release.Note = "Changed note"
- assert.NoError(t, UpdateRelease(user, gitRepo, release, nil))
+ assert.NoError(t, UpdateReleaseOrCreatReleaseFromTag(user, gitRepo, release, nil, false))
release, err = models.GetReleaseByID(release.ID)
assert.NoError(t, err)
assert.Equal(t, int64(releaseCreatedUnix), int64(release.CreatedUnix))
@@ -153,7 +153,7 @@ func TestRelease_Update(t *testing.T) {
releaseCreatedUnix = release.CreatedUnix
time.Sleep(2 * time.Second) // sleep 2 seconds to ensure a different timestamp
release.Title = "Changed title"
- assert.NoError(t, UpdateRelease(user, gitRepo, release, nil))
+ assert.NoError(t, UpdateReleaseOrCreatReleaseFromTag(user, gitRepo, release, nil, false))
release, err = models.GetReleaseByID(release.ID)
assert.NoError(t, err)
assert.Less(t, int64(releaseCreatedUnix), int64(release.CreatedUnix))
@@ -176,7 +176,7 @@ func TestRelease_Update(t *testing.T) {
time.Sleep(2 * time.Second) // sleep 2 seconds to ensure a different timestamp
release.Title = "Changed title"
release.Note = "Changed note"
- assert.NoError(t, UpdateRelease(user, gitRepo, release, nil))
+ assert.NoError(t, UpdateReleaseOrCreatReleaseFromTag(user, gitRepo, release, nil, false))
release, err = models.GetReleaseByID(release.ID)
assert.NoError(t, err)
assert.Equal(t, int64(releaseCreatedUnix), int64(release.CreatedUnix))