diff options
| author | Luc Donnet | 2015-01-05 14:56:12 +0100 |
|---|---|---|
| committer | Luc Donnet | 2015-01-05 14:56:12 +0100 |
| commit | 3bc6d313bebdc1f03e4021aabbc774a0cd97d938 (patch) | |
| tree | ac5b8c6d8309012136606d9fd9b9a00290f486a8 /spec/support/api_key.rb | |
| parent | e632a4634b1762f4c73d11f1e5b127de9832a1ff (diff) | |
| download | chouette-core-3bc6d313bebdc1f03e4021aabbc774a0cd97d938.tar.bz2 | |
Initialize rails 4 migration
Diffstat (limited to 'spec/support/api_key.rb')
| -rw-r--r-- | spec/support/api_key.rb | 2 |
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) |
