Fix misspelled variables
This commit is contained in:
parent
e7ae13deef
commit
1a09afc729
|
@ -61,26 +61,23 @@ func TestGetIssuesByIDs(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGetParticipantsByIssueID(t *testing.T) {
|
func TestGetParticipantsByIssueID(t *testing.T) {
|
||||||
|
|
||||||
assert.NoError(t, PrepareTestDatabase())
|
assert.NoError(t, PrepareTestDatabase())
|
||||||
|
|
||||||
checkPartecipants := func(issueID int64, userIDs []int) {
|
checkParticipants := func(issueID int64, userIDs []int) {
|
||||||
partecipants, err := GetParticipantsByIssueID(issueID)
|
participants, err := GetParticipantsByIssueID(issueID)
|
||||||
if assert.NoError(t, err) {
|
if assert.NoError(t, err) {
|
||||||
partecipantsIDs := make([]int, len(partecipants))
|
participantsIDs := make([]int, len(participants))
|
||||||
for i, u := range partecipants {
|
for i, u := range participants {
|
||||||
partecipantsIDs[i] = int(u.ID)
|
participantsIDs[i] = int(u.ID)
|
||||||
}
|
}
|
||||||
sort.Ints(partecipantsIDs)
|
sort.Ints(participantsIDs)
|
||||||
sort.Ints(userIDs)
|
sort.Ints(userIDs)
|
||||||
assert.Equal(t, userIDs, partecipantsIDs)
|
assert.Equal(t, userIDs, participantsIDs)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// User 1 is issue1 poster (see fixtures/issue.yml)
|
// User 1 is issue1 poster (see fixtures/issue.yml)
|
||||||
// User 2 only labeled issue1 (see fixtures/comment.yml)
|
// User 2 only labeled issue1 (see fixtures/comment.yml)
|
||||||
// Users 3 and 5 made actual comments (see fixtures/comment.yml)
|
// Users 3 and 5 made actual comments (see fixtures/comment.yml)
|
||||||
checkPartecipants(1, []int{3, 5})
|
checkParticipants(1, []int{3, 5})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user