Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
6543 committed Nov 9, 2019
1 parent 3ebb8f3 commit 59f3a9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion models/issue_assignees_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func TestMakeIDsFromAPIAssigneesToAdd(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, []int64{}, IDs)

IDs, err = MakeIDsFromAPIAssigneesToAdd("", []string{"non_existing_user"})
IDs, err = MakeIDsFromAPIAssigneesToAdd("", []string{"none_existing_user"})
assert.Error(t, err)

IDs, err = MakeIDsFromAPIAssigneesToAdd("user1", []string{"user1"})
Expand Down
4 changes: 2 additions & 2 deletions models/user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,12 +377,12 @@ func TestCreateUser_Issue5882(t *testing.T) {
func TestGetUserIDsByNames(t *testing.T) {

//ignore non existing
IDs, err := GetUserIDsByNames([]string{"user1", "user2", "do_not_exist"}, true)
IDs, err := GetUserIDsByNames([]string{"user1", "user2", "none_existing_user"}, true)
assert.NoError(t, err)
assert.Equal(t, []int64{1, 2}, IDs)

//ignore non existing
IDs, err = GetUserIDsByNames([]string{"user1", "do_not_exist"}, false)
assert.Error(t, err)
assert.Equal(t, []int64{}, IDs)
assert.Equal(t, []int64(nil), IDs)
}

0 comments on commit 59f3a9d

Please sign in to comment.