aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/api/v1/iboo_controller_spec.rb
blob: 64a929d1a7fb7df49496b818667dc7fdc2b6791b (plain)
1
2
3
4
5
6
7
8
9
10
11
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