diff options
Diffstat (limited to 'spec/support')
| -rw-r--r-- | spec/support/api_key.rb | 2 | ||||
| -rw-r--r-- | spec/support/referential.rb | 1 | 
2 files changed, 2 insertions, 1 deletions
| diff --git a/spec/support/api_key.rb b/spec/support/api_key.rb index 561e1f796..5aaa31217 100644 --- a/spec/support/api_key.rb +++ b/spec/support/api_key.rb @@ -5,7 +5,7 @@ module ApiKeyHelper    end    def get_api_key -    Api::V1::ApiKey.first_or_create( :referential_id => referential.id, :name => "test") +    Api::V1::ApiKey.first_or_create(referential: referential, organisation: organisation)    end    def config_formatted_request_with_authorization( format)      request.env['HTTP_AUTHORIZATION'] = ActionController::HttpAuthentication::Token.encode_credentials( get_api_key.token) diff --git a/spec/support/referential.rb b/spec/support/referential.rb index 57b510f69..c431856b8 100644 --- a/spec/support/referential.rb +++ b/spec/support/referential.rb @@ -12,6 +12,7 @@ module ReferentialHelper      base.class_eval do        extend ClassMethods        alias_method :referential, :first_referential +      alias_method :organisation, :first_organisation      end    end | 
