Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed bug with the options hash not being readable, and added some te…

…sts around it.
  • Loading branch information...
commit ca5a0515ff9738f0feca32eecd763f98d9249375 1 parent e1973a5
@tomtaylor tomtaylor authored
Showing with 5 additions and 1 deletion.
  1. +1 −1  lib/instapaper_full.rb
  2. +4 −0 test/instapaper_api_test.rb
View
2  lib/instapaper_full.rb
@@ -5,7 +5,7 @@
module InstapaperFull
class API
- attr_accessor :params
+ attr_accessor :options
def initialize(options = {})
@options = options
end
View
4 test/instapaper_api_test.rb
@@ -47,6 +47,10 @@ def test_successful_authentication
ip = InstapaperFull::API.new(:consumer_key => "test", :consumer_secret => "")
assert_equal true, ip.authenticate("tom@testing.com", "test")
+ assert_equal "thisisatoken", ip.options[:oauth_token]
+ assert_equal "thisisasecret", ip.options[:oauth_token_secret]
+ assert_equal 140230, ip.options[:user_id]
+ assert_equal "tom@tomtaylor.co.uk", ip.options[:username]
end
def test_failed_authentication
Please sign in to comment.
Something went wrong with that request. Please try again.