Skip to content

Commit 7cb1677

Browse files
committed
Adding access_token test
1 parent 0a750a6 commit 7cb1677

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

test/strategy_test.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,17 @@ def test_return_id_from_raw_info
1010
assert_equal '123', strategy.uid
1111
end
1212
end
13+
14+
class AccessTokenTest < StrategyTestCase
15+
def setup
16+
super
17+
@request.stubs(:params).returns({ 'access_token' => 'valid_access_token' })
18+
strategy.stubs(:client).returns(:client)
19+
end
20+
21+
def test_build_access_token
22+
token = strategy.build_access_token
23+
assert_equal token.token, 'valid_access_token'
24+
assert_equal token.client, :client
25+
end
26+
end

test/test_helper.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ def setup
1616

1717
@client_id = '123'
1818
@client_secret = '53cr3tz'
19+
@options = {}
1920
end
2021

2122
def strategy

0 commit comments

Comments
 (0)