+ 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
+
+ def oauth10_with_callback(client, callback_url)
+ token = get_request_token(client)
+
+ get "/oauth/authorize", :params => { :oauth_token => token.token }
+ assert_response :success
+ assert_template :authorize
+
+ post "/oauth/authorize",
+ :params => { :oauth_token => token.token, :oauth_callback => callback_url,
+ :allow_write_api => "1", :allow_read_gpx => "1" }
+ assert_response :redirect
+ assert_redirected_to "#{callback_url}?oauth_token=#{token.token}"