diff options
| author | Xinhui | 2017-08-22 14:42:26 +0200 |
|---|---|---|
| committer | Xinhui | 2017-08-22 14:52:49 +0200 |
| commit | 7c0d5f726634531e489db59695cb16df353ea975 (patch) | |
| tree | c50cba5d48042374c49f3c4670b769e622eba4ed /spec | |
| parent | e44b43ba2d6aeab84a2aead6e01aa9cd71c2d6e5 (diff) | |
| download | chouette-core-7c0d5f726634531e489db59695cb16df353ea975.tar.bz2 | |
API - Refactoring iboo controller basic auth username should be an organisation code
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/support/shared_context.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/spec/support/shared_context.rb b/spec/support/shared_context.rb index c08ee6163..1282518c1 100644 --- a/spec/support/shared_context.rb +++ b/spec/support/shared_context.rb @@ -1,8 +1,7 @@ shared_context 'iboo authenticated api user' do let(:api_key) { create(:api_key) } - let(:user) { create(:user, organisation: api_key.organisation ) } before do - request.env['HTTP_AUTHORIZATION'] = ActionController::HttpAuthentication::Basic.encode_credentials(user.username, api_key.token) + request.env['HTTP_AUTHORIZATION'] = ActionController::HttpAuthentication::Basic.encode_credentials(api_key.organisation.code, api_key.token) end end |
