test/oauth/access_grant_test.rb in rack-oauth2-server-2.0.0.beta4 vs test/oauth/access_grant_test.rb in rack-oauth2-server-2.0.0.beta5
- old
+ new
@@ -174,9 +174,18 @@
request_access_token :code=>grant.code, :redirect_uri=>"http://uberclient.dot/oz"
end
should_respond_with_access_token
end
+ context "access grant expired" do
+ setup do
+ Timecop.travel 300 do
+ request_access_token
+ end
+ end
+ should_return_error :invalid_grant
+ end
+
# 4.1.2. Resource Owner Password Credentials
context "no username" do
setup { request_with_username_password nil, "more" }