Sha256: 01c4b207843b68b9d53632b87f5573cecda5f0b005ad9a23615195fdaebb1311
Contents?: true
Size: 721 Bytes
Versions: 43
Compression:
Stored size: 721 Bytes
Contents
require 'spec_helper' describe SharedEntitiesController, type: :controller do describe 'index' do subject { get :index } it { expect(subject).to be_success } context 'when user is admin' do let(:organization) { create(:organization) } let(:idmap) { create(:idmap, organization: organization) } before do allow_any_instance_of(Maestrano::Connector::Rails::SessionHelper).to receive(:current_organization).and_return(organization) allow_any_instance_of(Maestrano::Connector::Rails::SessionHelper).to receive(:is_admin).and_return(true) end it 'assigns the idmaps' do subject expect(assigns(:idmaps)).to eq([idmap]) end end end end
Version data entries
43 entries across 43 versions & 1 rubygems