Skip to content

Commit eb41b72

Browse files
committed
Fixing test
1 parent 36e5564 commit eb41b72

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

spec/unit/endpoint/authorization_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@
4848
end
4949

5050
describe 'evil hackers messing with the state' do
51+
before do
52+
WebMock.stub_request(:post, "https://foobar.com/access_token_path")
53+
.to_return(status: 200, body: 'access_token=token&token_type=bearer')
54+
end
55+
5156
it 'does not succeed if state cookie mismatches' do
5257
Travis.redis.sadd('github:states', 'github-state')
5358
response = get '/auth/handshake?state=github-state&code=oauth-code'

0 commit comments

Comments
 (0)