public
Description: API wrapper for Amazon Associates Web Service.
Clone URL: git://github.com/jnunemaker/aaws.git
Search Repo:
jnunemaker (author)
Thu May 08 09:33:18 -0700 2008
commit  8a95d8eccdbf362dfcc4f07f380101b2e982b644
tree    d949dede457c588ae0d737cebc519034c03381c3
parent  1955a037d3bc0580b699658f13f3efb7d7c490c7
aaws / spec / aaws_book_spec.rb
100644 15 lines (12 sloc) 0.531 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require File.dirname(__FILE__) + '/spec_helper.rb'
 
describe AAWS::Book do
  it "should have search_index default param" do
    AAWS::Book.default_params.has_key?(:search_index).should == true
  end
  
  it "should return a collection of book objects when searching" do
    AAWS::Base.establish_connection('blah')
    xml = open(File.dirname(__FILE__) + '/fixtures/book_search_ruby_on_rails.xml').read
    AAWS::Connection.should_receive(:get).and_return(xml)
    books = AAWS::Book.search(:title => 'Ruby on Rails')
    
  end
end