Updated the factory_girl_rails dependency, fixed one pending spec (hopefully). #51

Merged
merged 3 commits into from Feb 21, 2012

Conversation

Projects
None yet
2 participants
@antekpiechnik
Contributor

antekpiechnik commented Feb 21, 2012

No description provided.

@@ -41,8 +43,7 @@ def translated_error_message(key)
end
it "includes token expiration in fragment" do
- pending "expiration time is given by the expired time - Time.now, which leads to a weird number"
- fragments("expires_in").should == 2.hours.to_i
+ fragments("expires_in").to_f.should == 2.hours.to_f

This comment has been minimized.

Show comment Hide comment
@felipeelias

felipeelias Feb 21, 2012

Owner

I'd rather change the oauth/authorization/token.rb:17 to return the fragment with the AccessToken#expires_in instead of #time_left.

Mainly because expires_in response is in seconds and it does not seem right to return seconds with decimals (like 3659.01231).

The OAuth spec is not clear about that, but it seems right given the example. http://tools.ietf.org/html/draft-ietf-oauth-v2-23#section-5.1

@felipeelias

felipeelias Feb 21, 2012

Owner

I'd rather change the oauth/authorization/token.rb:17 to return the fragment with the AccessToken#expires_in instead of #time_left.

Mainly because expires_in response is in seconds and it does not seem right to return seconds with decimals (like 3659.01231).

The OAuth spec is not clear about that, but it seems right given the example. http://tools.ietf.org/html/draft-ietf-oauth-v2-23#section-5.1

This comment has been minimized.

Show comment Hide comment
@antekpiechnik

antekpiechnik Feb 21, 2012

Contributor
@felipeelias

This comment has been minimized.

Show comment Hide comment
@felipeelias

felipeelias Feb 21, 2012

Owner

Thanks!

Owner

felipeelias commented Feb 21, 2012

Thanks!

felipeelias added a commit that referenced this pull request Feb 21, 2012

Merge pull request #51 from antekpiechnik/master
Updated the factory_girl_rails dependency, fix expires_in response which returned a float number instead of integer

@felipeelias felipeelias merged commit 1b18ae8 into doorkeeper-gem:master Feb 21, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment