test/admin/api_test.rb in rack-oauth2-server-2.0.0.beta vs test/admin/api_test.rb in rack-oauth2-server-2.0.0.beta2

- old
+ new

@@ -16,16 +16,16 @@ end extend Helpers def without_scope - token = Server::AccessToken.get_token_for("Superman", "nobody", client.id) + token = Server.get_token_for("Superman", client.id, "nobody") header "Authorization", "OAuth #{token.token}" end def with_scope - token = Server::AccessToken.get_token_for("Superman", "oauth-admin", client.id) + token = Server.get_token_for("Superman", client.id, "oauth-admin") header "Authorization", "OAuth #{token.token}" end def json JSON.parse(last_response.body) @@ -147,10 +147,10 @@ context "tokens" do setup do tokens = [] 1.upto(10).map do |days| Timecop.travel -days*86400 do - tokens << Server::AccessToken.get_token_for("Superman", days.to_s, client.id) + tokens << Server.get_token_for("Superman", client.id, days.to_s) end end # Revoke one token today (within past 7 days), one 10 days ago (beyond) tokens.first.revoke! tokens.last.revoke!