aboutsummaryrefslogtreecommitdiffstats
path: root/spec/support/api_key.rb
diff options
context:
space:
mode:
authorRobert2017-07-17 15:34:33 +0200
committerRobert2017-07-19 08:40:03 +0200
commit0c69d141911a1f8e55c50d521691506ba7f32ac0 (patch)
treeff6f6586c6a24d0e4fc56683da3ab139178fdb0e /spec/support/api_key.rb
parenteac2dc45fdf6c7dbaa413396ea513b1642b32c1c (diff)
downloadchouette-core-0c69d141911a1f8e55c50d521691506ba7f32ac0.tar.bz2
Refs: #3506@16h Request Spec for NetexImport API and implementation
- Carrier Wave Upload with `fixture_file_upload` - Request specs to .json - Implementation - API token setup - Refuted experiments with controller specs
Diffstat (limited to 'spec/support/api_key.rb')
-rw-r--r--spec/support/api_key.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/support/api_key.rb b/spec/support/api_key.rb
index 9353fac15..561e1f796 100644
--- a/spec/support/api_key.rb
+++ b/spec/support/api_key.rb
@@ -1,5 +1,9 @@
module ApiKeyHelper
+ def authorization_token_header(key)
+ {'Authorization' => "Token token=#{key}"}
+ end
+
def get_api_key
Api::V1::ApiKey.first_or_create( :referential_id => referential.id, :name => "test")
end