Permalink
Browse files

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

…sts around it.
  • Loading branch information...
1 parent e1973a5 commit ca5a0515ff9738f0feca32eecd763f98d9249375 @tomtaylor tomtaylor committed Dec 2, 2011
Showing with 5 additions and 1 deletion.
  1. +1 −1 lib/instapaper_full.rb
  2. +4 −0 test/instapaper_api_test.rb
View
@@ -5,7 +5,7 @@
module InstapaperFull
class API
- attr_accessor :params
+ attr_accessor :options
def initialize(options = {})
@options = options
end
@@ -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

0 comments on commit ca5a051

Please sign in to comment.