FC ParticulierClientSpec: simplier spec
This commit is contained in:
parent
4c2da46dd8
commit
06d9c4356e
1 changed files with 6 additions and 8 deletions
|
@ -2,16 +2,14 @@ require 'spec_helper'
|
|||
|
||||
describe FranceConnectParticulierClient do
|
||||
describe '.initialize' do
|
||||
it 'create an openid client' do
|
||||
expect(described_class).to be < OpenIDConnect::Client
|
||||
end
|
||||
subject { FranceConnectParticulierClient.new(code) }
|
||||
|
||||
context 'when given code in params' do
|
||||
let(:code) { 'plop' }
|
||||
subject { described_class.new(code) }
|
||||
it 'set authorisation code' do
|
||||
expect_any_instance_of(described_class).to receive(:authorization_code=).with(code)
|
||||
described_class.new(code)
|
||||
end
|
||||
|
||||
before { allow_any_instance_of(FranceConnectParticulierClient).to receive(:authorization_code=) }
|
||||
|
||||
it { is_expected.to have_received(:authorization_code=).with(code) }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue