spec/lib/server_spec.rb in doorkeeper-4.2.6 vs spec/lib/server_spec.rb in doorkeeper-4.3.0
- old
+ new
@@ -43,7 +43,17 @@
it 'builds the request with selected strategy' do
stub_const 'Doorkeeper::Request::Code', fake_class
expect(fake_class).to receive(:new).with(subject)
subject.authorization_request :code
end
+
+ it 'builds the request with composit strategy name' do
+ allow(Doorkeeper.configuration).
+ to receive(:authorization_response_types).
+ and_return(['id_token token'])
+
+ stub_const 'Doorkeeper::Request::IdTokenToken', fake_class
+ expect(fake_class).to receive(:new).with(subject)
+ subject.authorization_request 'id_token token'
+ end
end
end