test/client_test.rb in gowalla-0.5.2 vs test/client_test.rb in gowalla-0.5.3
- old
+ new
@@ -4,12 +4,10 @@
context "When using the Gowalla API" do
setup do
@client = gowalla_test_client
end
-
-
end
context "when accessing the API anonymously" do
should "send requests unencrypted over plain HTTP" do
@client = Gowalla::Client.new
@@ -32,11 +30,11 @@
stub_get('https://username:password@api.gowalla.com/trips', 'trips.json')
trips = @client.trips
@client.username.should == 'username'
end
-
+
should "use HTTPS to avoid sending password in plain text" do
Gowalla.configure do |config|
config.api_key = 'api_key'
config.username = 'username'
config.password = 'password'
@@ -77,18 +75,17 @@
end
should "use HTTPS to avoid sending credentials in plain text" do
@client.api_url.should == 'https://api.gowalla.com'
end
-
+
should "create an OAuth2 client" do
@client.oauth_client.class.to_s.should == "OAuth2::Client"
end
should "indicate if it needs an access_token" do
@client.needs_access?.should == true
end
end
-
end