twitter-auth 0.1.5 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION.yml +1 -1
- data/app/models/twitter_auth/oauth_user.rb +4 -1
- data/spec/debug.log +3696 -0
- data/spec/models/twitter_auth/oauth_user_spec.rb +9 -0
- metadata +1 -1
@@ -34,9 +34,18 @@ describe TwitterAuth::OauthUser do
|
|
34
34
|
|
35
35
|
it 'should return the user if he/she exists' do
|
36
36
|
user = Factory.create(:twitter_oauth_user, :login => 'twitterman')
|
37
|
+
user.reload
|
37
38
|
User.identify_or_create_from_access_token(@token).should == user
|
38
39
|
end
|
39
40
|
|
41
|
+
it 'should update the access_token and access_secret for the user if he/she exists' do
|
42
|
+
user = Factory.create(:twitter_oauth_user, :login => 'twitterman', :access_token => 'someothertoken', :access_secret => 'someothersecret')
|
43
|
+
User.identify_or_create_from_access_token(@token)
|
44
|
+
user.reload
|
45
|
+
user.access_token.should == @token.token
|
46
|
+
user.access_secret.should == @token.secret
|
47
|
+
end
|
48
|
+
|
40
49
|
it 'should update the user\'s attributes based on the twitter info' do
|
41
50
|
user = Factory.create(:twitter_oauth_user, :login => 'twitterman', :name => 'Not Twitter Man')
|
42
51
|
User.identify_or_create_from_access_token(@token).name.should == 'Twitter Man'
|