diff options
| author | Xinhui | 2017-08-23 14:28:22 +0200 | 
|---|---|---|
| committer | Xinhui | 2017-08-23 14:28:22 +0200 | 
| commit | 1d496326ca9177bd1b9b5202eaa5f6137bfd7fa6 (patch) | |
| tree | f40452096e9aa7a96e99bc71534a4a1419cfccf8 /spec/support | |
| parent | 6ef942b93eaa0a1d0d6203a3e984f95c751e9ea9 (diff) | |
| download | chouette-core-1d496326ca9177bd1b9b5202eaa5f6137bfd7fa6.tar.bz2 | |
API - WorkbenchImport #create action
Refs #4280
Diffstat (limited to 'spec/support')
| -rw-r--r-- | spec/support/shared_context.rb | 8 | 
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/support/shared_context.rb b/spec/support/shared_context.rb index e7416f2f1..e9b0025a2 100644 --- a/spec/support/shared_context.rb +++ b/spec/support/shared_context.rb @@ -5,3 +5,11 @@ shared_context 'iboo authenticated api user' do      request.env['HTTP_AUTHORIZATION'] = ActionController::HttpAuthentication::Basic.encode_credentials(api_key.organisation.code, api_key.token)    end  end + +shared_context 'iboo wrong authorisation api user' do +  let(:api_key) { create(:api_key, organisation: organisation) } + +  before do +    request.env['HTTP_AUTHORIZATION'] = ActionController::HttpAuthentication::Basic.encode_credentials('fake code', api_key.token) +  end +end  | 
