- assert_nil token.invalidated_at
- assert_allowed token, client.permissions
+ assert_not_nil token.invalidated_at
+
+ get "/oauth/authorize", :oauth_token => token.token
+ assert_response :success
+ assert_template :authorize_failure
+ assert_select "p", "The authorization token is not valid."
+ token.reload
+ assert_nil token.authorized_at
+ assert_not_nil token.invalidated_at
+
+ post "/oauth/authorize", :oauth_token => token.token
+ assert_response :success
+ assert_template :authorize_failure
+ assert_select "p", "The authorization token is not valid."
+ token.reload
+ assert_nil token.authorized_at
+ assert_not_nil token.invalidated_at
+ end