test/test_readernaut.rb in readernaut-0.1.2 vs test/test_readernaut.rb in readernaut-0.2.0
- old
+ new
@@ -24,8 +24,17 @@
stub_get "http://readernaut.com/api/v1/json/pengwynn/contacts/?page=2", "contacts.json"
results = Readernaut.contacts('pengwynn', :page => 2)
results.page.should == 2
results.contacts.first.user.username.should == 'spacecowboyian'
end
+
+ should "retrieve a list of books being read for a user" do
+ stub_get "http://readernaut.com/api/v1/json/nathan/books/reading/", "books_currently_reading.json"
+ results = Readernaut.books_reading('nathan')
+ edition = results.reader_books.first.book_edition
+ edition.title.should == "Towards a New Architecture"
+ edition.isbn.should == '0486250237'
+ edition.covers.cover_large.should == 'http://media.readernaut.com/book_covers/0486250237_t150.jpg'
+ end
end
end