summaryrefslogtreecommitdiff
path: root/tests/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'tests/helpers')
-rw-r--r--tests/helpers/bonafide_helper.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/helpers/bonafide_helper.rb b/tests/helpers/bonafide_helper.rb
index 95e3e3b7..5b886228 100644
--- a/tests/helpers/bonafide_helper.rb
+++ b/tests/helpers/bonafide_helper.rb
@@ -90,7 +90,10 @@ class LeapTest
#
def identity_exists?(address)
url = api_url("/identities/#{URI.encode(address)}.json")
- get(url, nil, api_options(:auth => :monitor)) do |body, response|
+ options = {:ok_codes => [200, 404]}.merge(
+ api_options(:auth => :monitor)
+ )
+ assert_get(url, nil, options) do |body, response|
return response.code == "200"
end
end
@@ -118,7 +121,9 @@ class LeapTest
#
def find_user_by_login(login)
url = api_url("/users/0.json?login=#{login}")
- options = {:ok_codes => [200, 404]}.merge(api_options(:auth => :monitor))
+ options = {:ok_codes => [200, 404]}.merge(
+ api_options(:auth => :monitor)
+ )
assert_get(url, nil, options) do |body, response|
if response.code == "200"
return JSON.parse(body)