spec/omniauth/strategies/g5_spec.rb in omniauth-g5-0.2.0 vs spec/omniauth/strategies/g5_spec.rb in omniauth-g5-0.3.0
- old
+ new
@@ -148,26 +148,26 @@
it { is_expected.to be_empty }
end
context 'when there is one role' do
- let(:role_data) { [{'name' => 'viewer'}] }
+ let(:role_data) { [{'name' => 'viewer', 'type'=>'GLOBAL','urn'=>nil}] }
its(:count) { is_expected.to eq(1) }
it 'should return the role name' do
expect(roles.first[:name]).to eq(role_data.first['name'])
end
end
context 'when there are two roles' do
let(:role_data) do
- [{'name' => 'super_admin'},
- {'name' => 'editor'}]
+ [{'name' => 'super_admin', 'type'=>'GLOBAL', 'urn'=>nil},
+ {'name' => 'editor', 'type'=>'G5Updatable::Client', 'urn'=>'someurn'}]
end
its(:count) { is_expected.to eq(2) }
- it { is_expected.to include({name: 'super_admin'}) }
- it { is_expected.to include({name: 'editor'}) }
+ it { is_expected.to include({name: 'super_admin', type: 'GLOBAL', urn:nil}) }
+ it { is_expected.to include({name: 'editor', type: 'G5Updatable::Client', urn:'someurn'}) }
end
end
end