From 2df1767902996d43b56aa215bea15a033237b3ec Mon Sep 17 00:00:00 2001 From: Xinhui Date: Tue, 22 Aug 2017 15:33:43 +0200 Subject: Rspec api iboo controller --- spec/controllers/api/v1/iboo_controller_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'spec/controllers/api/v1') 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 -- cgit v1.2.3