spec/bearcat/client/o_auth2_spec.rb in bearcat-1.1.1 vs spec/bearcat/client/o_auth2_spec.rb in bearcat-1.2.0
- old
+ new
@@ -8,13 +8,13 @@
redirect_url.should == "http://canvas.instructure.com/login/oauth2/auth?client_id=10000000000002&redirect_uri=http%3A%2F%2Flocalhost%3A9393&response_type=code"
end
it "sets the auth_token" do
stub_post(client, "/login/oauth2/token").
- with(:body => {"client_id"=>"10000000000002", "client_secret"=>"secret", "code"=>"code", "redirect_url"=>"http://localhost:9393"}).
+ with(:body => {"client_id"=>"10000000000002", "client_secret"=>"secret", "code"=>"code", "redirect_url"=>"http://localhost:9393", 'grant_type' => 'authorization_code'}).
to_return(json_response('access_token.json'))
client.retrieve_token(10000000000002, 'http://localhost:9393', 'secret', 'code')
client.config.token.should == "foo_bar_token"
client.instance_variable_get(:@connection).headers[:authorization].should == 'Bearer foo_bar_token'
end
-end
\ No newline at end of file
+end