fgraph 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION.yml +1 -1
- data/lib/fgraph/client.rb +2 -2
- data/test/fgraph/client_test.rb +4 -2
- metadata +2 -2
data/VERSION.yml
CHANGED
data/lib/fgraph/client.rb
CHANGED
@@ -33,8 +33,8 @@ module FGraph
|
|
33
33
|
@options = options
|
34
34
|
end
|
35
35
|
|
36
|
-
def oauth_authorize_url(redirect_uri)
|
37
|
-
FGraph.oauth_authorize_url(self.options[:client_id], redirect_uri)
|
36
|
+
def oauth_authorize_url(redirect_uri, options={})
|
37
|
+
FGraph.oauth_authorize_url(self.options[:client_id], redirect_uri, options)
|
38
38
|
end
|
39
39
|
|
40
40
|
def oauth_access_token(redirect_uri, code)
|
data/test/fgraph/client_test.rb
CHANGED
@@ -19,8 +19,10 @@ class ClientTest < Test::Unit::TestCase
|
|
19
19
|
|
20
20
|
context "FGraph::Client#oauth_authorize_url" do
|
21
21
|
should "call FGraph.oauth_authorize_url with :client_id option" do
|
22
|
-
FGraph.expects(:oauth_authorize_url).with(FACEBOOK_API_KEY, FACEBOOK_OAUTH_REDIRECT_URI
|
23
|
-
|
22
|
+
FGraph.expects(:oauth_authorize_url).with(FACEBOOK_API_KEY, FACEBOOK_OAUTH_REDIRECT_URI, {
|
23
|
+
:scope => 'user_photos'
|
24
|
+
})
|
25
|
+
fb_client.oauth_authorize_url(FACEBOOK_OAUTH_REDIRECT_URI, :scope => 'user_photos')
|
24
26
|
end
|
25
27
|
end
|
26
28
|
|