Files
openfoodnetwork/spec/models/spree/payment_method_spec.rb
2013-10-18 09:09:53 +11:00

15 lines
408 B
Ruby

require 'spec_helper'
module Spree
describe PaymentMethod do
it "finds payment methods for a particular distributor" do
d1 = create(:distributor_enterprise)
d2 = create(:distributor_enterprise)
pm1 = create(:payment_method, distributors: [d1, d1])
pm2 = create(:payment_method, distributors: [d2, d2])
PaymentMethod.for_distributor(d1).should == [pm1]
end
end
end