mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Patching up the tests to check on our serialisers
This commit is contained in:
3
app/serializers/order_cycle_serializer.rb
Normal file
3
app/serializers/order_cycle_serializer.rb
Normal file
@@ -0,0 +1,3 @@
|
||||
class OrderCycleSerializer < ActiveModel::Serializer
|
||||
attributes :orders_close_at
|
||||
end
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user