1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-13 22:17:20 +00:00

[API] GetRelease by tag only return release (#14397)

get release by tag should filter out tag releases to be consistent with list releases and get by id

Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
Cameron Braid
2021-02-04 14:12:25 +11:00
committed by GitHub
parent 87009ab40a
commit 3c965c3e30
2 changed files with 8 additions and 4 deletions

View File

@ -7,7 +7,6 @@ package integrations
import (
"fmt"
"net/http"
"strings"
"testing"
"code.gitea.io/gitea/models"
@ -152,7 +151,7 @@ func TestAPIGetReleaseByTag(t *testing.T) {
var err *api.APIError
DecodeJSON(t, resp, &err)
assert.True(t, strings.HasPrefix(err.Message, "release tag does not exist"))
assert.EqualValues(t, "Not Found", err.Message)
}
func TestAPIDeleteTagByName(t *testing.T) {