2015-12-24 10:12:23 +01:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe FranceConnectParticulierClient do
|
|
|
|
describe '.initialize' do
|
|
|
|
it 'create an openid client' do
|
|
|
|
expect(described_class).to be < OpenIDConnect::Client
|
|
|
|
end
|
|
|
|
context 'when given code in params' do
|
|
|
|
let(:code) { 'plop' }
|
2018-01-11 11:07:25 +01:00
|
|
|
subject { described_class.new(code) }
|
2015-12-24 10:12:23 +01:00
|
|
|
it 'set authorisation code' do
|
|
|
|
expect_any_instance_of(described_class).to receive(:authorization_code=).with(code)
|
2018-01-11 11:07:25 +01:00
|
|
|
described_class.new(code)
|
2015-12-24 10:12:23 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2017-04-04 15:27:04 +02:00
|
|
|
end
|