Uncaching some parts and adding specs

This commit is contained in:
Will Marshall
2014-07-10 14:49:21 +10:00
parent f57e8513d5
commit 26e8a1fd91
4 changed files with 59 additions and 16 deletions

View File

@@ -142,11 +142,10 @@ describe ShopController do
end
it "includes the primary taxon" do
taxon = mock_model(Spree::Taxon, name: "fruitbat")
taxon = create(:taxon)
Spree::Product.any_instance.stub(:primary_taxon).and_return taxon
taxon.stub_chain(:icon, :url).and_return ""
xhr :get, :products
response.body.should have_content "fruitbat"
response.body.should have_content taxon.name
end
end
end