More integration test fixes (#604)
This commit is contained in:
parent
e5b5b3447a
commit
7aeaaa45e1
3 changed files with 7 additions and 5 deletions
|
@ -12,7 +12,6 @@ import (
|
|||
)
|
||||
|
||||
/*
|
||||
*
|
||||
// DeleteOrgMembership remove a member from an organization
|
||||
func (c *Client) DeleteOrgMembership(org, user string) error {}
|
||||
*/
|
||||
|
|
|
@ -50,7 +50,7 @@ func TestTeamSearch(t *testing.T) {
|
|||
Query: "Admins",
|
||||
})
|
||||
assert.NoError(t, err)
|
||||
assert.Len(t, teams, 1)
|
||||
|
||||
if assert.Len(t, teams, 1) {
|
||||
assert.Equal(t, "Admins", teams[0].Name)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ package gitea
|
|||
|
||||
import (
|
||||
"log"
|
||||
"sort"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
@ -25,7 +26,9 @@ func TestRepoBranches(t *testing.T) {
|
|||
assert.NoError(t, err)
|
||||
assert.Len(t, bl, 3)
|
||||
|
||||
// FIXME: order of returned branches is not deterministic!
|
||||
sort.Slice(bl, func(i, j int) bool {
|
||||
return bl[i].Name < bl[j].Name
|
||||
})
|
||||
assert.EqualValues(t, "feature", bl[0].Name)
|
||||
assert.EqualValues(t, "main", bl[1].Name)
|
||||
assert.EqualValues(t, "update", bl[2].Name)
|
||||
|
|
Loading…
Reference in a new issue