forked from forgejo/forgejo
Fixed assert statements. (#16089)
This commit is contained in:
parent
51775f65bc
commit
3607f79d78
56 changed files with 227 additions and 228 deletions
|
@ -45,14 +45,14 @@ func TestAPINotification(t *testing.T) {
|
|||
|
||||
assert.Len(t, apiNL, 3)
|
||||
assert.EqualValues(t, 4, apiNL[0].ID)
|
||||
assert.EqualValues(t, true, apiNL[0].Unread)
|
||||
assert.EqualValues(t, false, apiNL[0].Pinned)
|
||||
assert.True(t, apiNL[0].Unread)
|
||||
assert.False(t, apiNL[0].Pinned)
|
||||
assert.EqualValues(t, 3, apiNL[1].ID)
|
||||
assert.EqualValues(t, false, apiNL[1].Unread)
|
||||
assert.EqualValues(t, true, apiNL[1].Pinned)
|
||||
assert.False(t, apiNL[1].Unread)
|
||||
assert.True(t, apiNL[1].Pinned)
|
||||
assert.EqualValues(t, 2, apiNL[2].ID)
|
||||
assert.EqualValues(t, false, apiNL[2].Unread)
|
||||
assert.EqualValues(t, false, apiNL[2].Pinned)
|
||||
assert.False(t, apiNL[2].Unread)
|
||||
assert.False(t, apiNL[2].Pinned)
|
||||
|
||||
// -- GET /repos/{owner}/{repo}/notifications --
|
||||
req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/notifications?status-types=unread&token=%s", user2.Name, repo1.Name, token))
|
||||
|
@ -74,8 +74,8 @@ func TestAPINotification(t *testing.T) {
|
|||
DecodeJSON(t, resp, &apiN)
|
||||
|
||||
assert.EqualValues(t, 5, apiN.ID)
|
||||
assert.EqualValues(t, false, apiN.Pinned)
|
||||
assert.EqualValues(t, true, apiN.Unread)
|
||||
assert.False(t, apiN.Pinned)
|
||||
assert.True(t, apiN.Unread)
|
||||
assert.EqualValues(t, "issue4", apiN.Subject.Title)
|
||||
assert.EqualValues(t, "Issue", apiN.Subject.Type)
|
||||
assert.EqualValues(t, thread5.Issue.APIURL(), apiN.Subject.URL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue