diff --git a/app/serializers/order_cycle_serializer.rb b/app/serializers/order_cycle_serializer.rb new file mode 100644 index 0000000000..202e7ba0d3 --- /dev/null +++ b/app/serializers/order_cycle_serializer.rb @@ -0,0 +1,3 @@ +class OrderCycleSerializer < ActiveModel::Serializer + attributes :orders_close_at +end diff --git a/spec/controllers/shop_controller_spec.rb b/spec/controllers/shop_controller_spec.rb index a3d7997479..8f355c259b 100644 --- a/spec/controllers/shop_controller_spec.rb +++ b/spec/controllers/shop_controller_spec.rb @@ -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