Skip to content

Commit

Permalink
add test for username in User REST search
Browse files Browse the repository at this point in the history
  • Loading branch information
geektortoise committed Apr 24, 2020
1 parent 1555d54 commit c54e2f5
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/functional/be/cytomine/search/UserSearchTests.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@ class UserSearchTests {
assert json.size == 1
assert UserAPI.containsInJSONList(u2.id,json)

searchParameters = [[operator : "ilike", field : "fullName", value:u2.username]]

result = UserAPI.searchAndList(searchParameters, Infos.SUPERADMINLOGIN, Infos.SUPERADMINPASSWORD)
assert 200 == result.code
json = JSON.parse(result.data)
assert json.collection instanceof JSONArray
assert json.size == 1
assert UserAPI.containsInJSONList(u2.id,json)

searchParameters = [[operator : "ilike", field : "fullName", value:u2.email]]

result = UserAPI.searchAndList( searchParameters, Infos.SUPERADMINLOGIN, Infos.SUPERADMINPASSWORD)
Expand Down

0 comments on commit c54e2f5

Please sign in to comment.