diff options
Diffstat (limited to 'spec/controllers/api/v1')
| -rw-r--r-- | spec/controllers/api/v1/iboo_controller_spec.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/controllers/api/v1/iboo_controller_spec.rb b/spec/controllers/api/v1/iboo_controller_spec.rb index 92b70711e..64a929d1a 100644 --- a/spec/controllers/api/v1/iboo_controller_spec.rb +++ b/spec/controllers/api/v1/iboo_controller_spec.rb @@ -1,5 +1,12 @@ require 'rails_helper' RSpec.describe Api::V1::IbooController, type: :controller do + context '#authenticate' do + include_context 'iboo authenticated api user' + it 'should set current organisation' do + controller.send(:authenticate) + expect(assigns(:current_organisation)).to eq api_key.organisation + end + end end |
