delegated_auth_redirect_uri for easier testing of delegated_auth_redirect
This way we can run specs with overrides in a sane way. test plan: n/a Change-Id: Iffa749feb04c531a5abd6892a48e6dcd7894e8be Reviewed-on: https://gerrit.instructure.com/7728 Tested-by: Hudson <hudson@instructure.com> Reviewed-by: Cody Cutrer <cody@instructure.com>
This commit is contained in:
parent
e0b58c2b94
commit
e9e53291b9
|
@ -284,7 +284,11 @@ module AuthenticationMethods
|
|||
end
|
||||
|
||||
def delegated_auth_redirect(uri)
|
||||
redirect_to(uri)
|
||||
redirect_to(delegated_auth_redirect_uri(uri))
|
||||
end
|
||||
|
||||
def delegated_auth_redirect_uri(uri)
|
||||
uri
|
||||
end
|
||||
|
||||
# if true, the user is currently stepping through the oauth2 flow for the canvas api
|
||||
|
|
|
@ -211,7 +211,7 @@ describe "OAuth2", :type => :integration do
|
|||
CASClient::Client.stubs(:new).returns(cas)
|
||||
|
||||
get response['Location']
|
||||
response.should redirect_to(cas.add_service_to_login_url(login_url))
|
||||
response.should redirect_to(@controller.delegated_auth_redirect_uri(cas.add_service_to_login_url(login_url)))
|
||||
|
||||
get '/login', :ticket => 'ST-abcd'
|
||||
response.should be_redirect
|
||||
|
|
|
@ -215,7 +215,7 @@ describe AccountsController do
|
|||
config = { :cas_base_url => account.account_authorization_config.auth_base }
|
||||
cas_client = CASClient::Client.new(config)
|
||||
get 'show', :id => account.id
|
||||
response.should redirect_to(cas_client.add_service_to_login_url(login_url))
|
||||
response.should redirect_to(@controller.delegated_auth_redirect_uri(cas_client.add_service_to_login_url(login_url)))
|
||||
end
|
||||
|
||||
it "should count total courses correctly" do
|
||||
|
|
Loading…
Reference in New Issue