spec/base_spec.rb in reviewed-0.0.2 vs spec/base_spec.rb in reviewed-0.0.3

- old
+ new

@@ -43,19 +43,19 @@ context 'with a valid request' do use_vcr_cassette 'base/find_ok' it 'fetches content from the api' do - model = Reviewed::Example.find('5036d7dd60de7d2065075752') + model = Reviewed::Example.find('506b0b46bd02862270000747') model.raw_response.should_not be_nil end it 'parses response json and returns an object' do - model = Reviewed::Example.find('5036d7dd60de7d2065075752') + model = Reviewed::Example.find('506b0b46bd02862270000747') model.class.should == Reviewed::Example - model.id.should == '5036d7dd60de7d2065075752' - model.name.should == 'Fast Appliances To Save You Time' + model.id.should == '506b0b46bd02862270000747' + model.name.should == 'Minden Master II Grill Review' end end context 'with an invalid request' do use_vcr_cassette 'base/find_error_key' @@ -84,10 +84,10 @@ collection.class.should == Reviewed::Collection end it 'returns the appropriate page of results' do collection = Reviewed::Article.where(:page => 2) - collection.total.should == 7141 + collection.total.should > 1 collection.current_page.should == 2 end it 'filters collections using other supported options' do collection = Reviewed::Article.where(:keywords => 'minden')