Patching up the tests to check on our serialisers

This commit is contained in:
Will Marshall
2013-12-18 16:15:23 +11:00
parent 6d124b3275
commit 1f012dc52c
2 changed files with 4 additions and 1 deletions

View File

@@ -0,0 +1,3 @@
class OrderCycleSerializer < ActiveModel::Serializer
attributes :orders_close_at
end

View File

@@ -81,7 +81,7 @@ describe ShopController do
it "only returns products for the current order cycle" do
controller.stub(:current_order_cycle).and_return order_cycle
xhr :get, :products
response.body.should == [product].to_json
response.body.should == [Spree::ProductSerializer.new(product)].to_json
end
end
end