notes about failing spec in auth handshake
This commit is contained in:
parent
58ce449ca4
commit
7643a253fa
|
@ -276,8 +276,8 @@ class Travis::Api::App
|
|||
user
|
||||
end
|
||||
|
||||
def get_token(endoint, values)
|
||||
response = Faraday.new(ssl: Travis.config.github.ssl).post(endoint, values)
|
||||
def get_token(endpoint, values)
|
||||
response = Faraday.new(ssl: Travis.config.github.ssl).post(endpoint, values)
|
||||
parameters = Addressable::URI.form_unencode(response.body)
|
||||
token_info = parameters.assoc("access_token")
|
||||
halt 401, 'could not resolve github token' unless token_info
|
||||
|
|
|
@ -75,6 +75,8 @@ describe Travis::Api::App::Endpoint::Authorization do
|
|||
User::Oauth.instance_variable_set("@wanted_scopes", nil)
|
||||
end
|
||||
|
||||
# in endpoint/authorization.rb 271, get_token faraday raises the exception:
|
||||
# hostname "foobar.com" does not match the server certificate
|
||||
it 'redirects to insufficient access page' do
|
||||
response = get '/auth/handshake?state=github-state&code=oauth-code'
|
||||
response.should redirect_to('https://travis-ci.org/insufficient_access')
|
||||
|
|
Loading…
Reference in New Issue
Block a user