require 'spec_helper'

describe Suppliers::OrderSerializer, type: :serializer do
  it "works" do
    user = create :user
    order = create :order, user: user
    order.product_orders # preload empty
    result = nil
    expect{ result = described_class.serialize(order, include: %w[user]).deep_symbolize_keys }.not_to perform_any_queries
    result[:included].size.should eq 1
  end

end
