debian-mirror-gitlab/spec/routing/openid_connect_spec.rb

33 lines
1.2 KiB
Ruby
Raw Normal View History

2019-12-26 22:10:19 +05:30
# frozen_string_literal: true
2017-08-17 22:00:37 +05:30
require 'spec_helper'
2021-12-11 22:18:48 +05:30
# oauth_discovery_keys GET /oauth/discovery/keys(.:format) jwks#keys
# oauth_discovery_provider GET /.well-known/openid-configuration(.:format) jwks#provider
# oauth_discovery_webfinger GET /.well-known/webfinger(.:format) jwks#webfinger
2020-07-28 23:09:34 +05:30
RSpec.describe Doorkeeper::OpenidConnect::DiscoveryController, 'routing' do
2017-08-17 22:00:37 +05:30
it "to #provider" do
2021-12-11 22:18:48 +05:30
expect(get('/.well-known/openid-configuration')).to route_to('jwks#provider')
2017-08-17 22:00:37 +05:30
end
it "to #webfinger" do
2021-12-11 22:18:48 +05:30
expect(get('/.well-known/webfinger')).to route_to('jwks#webfinger')
2017-08-17 22:00:37 +05:30
end
it "to #keys" do
2021-12-11 22:18:48 +05:30
expect(get('/oauth/discovery/keys')).to route_to('jwks#keys')
2017-08-17 22:00:37 +05:30
end
end
# oauth_userinfo GET /oauth/userinfo(.:format) doorkeeper/openid_connect/userinfo#show
# POST /oauth/userinfo(.:format) doorkeeper/openid_connect/userinfo#show
2020-07-28 23:09:34 +05:30
RSpec.describe Doorkeeper::OpenidConnect::UserinfoController, 'routing' do
2017-08-17 22:00:37 +05:30
it "to #show" do
expect(get('/oauth/userinfo')).to route_to('doorkeeper/openid_connect/userinfo#show')
end
it "to #show" do
expect(post('/oauth/userinfo')).to route_to('doorkeeper/openid_connect/userinfo#show')
end
end