aboutsummaryrefslogtreecommitdiffstats
path: root/spec/support/api_key.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/api_key.rb')
-rw-r--r--spec/support/api_key.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/support/api_key.rb b/spec/support/api_key.rb
index dc7111214..9353fac15 100644
--- a/spec/support/api_key.rb
+++ b/spec/support/api_key.rb
@@ -1,7 +1,7 @@
module ApiKeyHelper
def get_api_key
- Api::V1::ApiKey.find_or_create_by_referential_id_and_name( referential.id, "test")
+ Api::V1::ApiKey.first_or_create( :referential_id => referential.id, :name => "test")
end
def config_formatted_request_with_authorization( format)
request.env['HTTP_AUTHORIZATION'] = ActionController::HttpAuthentication::Token.encode_credentials( get_api_key.token)