OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/modules/openid_connect/spec/requests/openid_connect_spec_helpers.rb

17 lines
488 B

module OpenIDConnectSpecHelpers
def redirect_from_provider(name = 'heroku')
# Emulate the provider's redirect with a nonsense code.
get "/auth/#{name}/callback",
params: {
code: 'foobar',
redirect_uri: "http://localhost:3000/auth/#{name}/callback",
state: session['omniauth.state']
}
end
def click_on_signin(pro_name = 'heroku')
# Emulate click on sign-in for that particular provider
get "/auth/#{pro_name}"
end
end