Files
openfoodnetwork/spec/models/spree/payment_method_spec.rb

15 lines
400 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])
pm2 = create(:payment_method, distributors: [d2])
PaymentMethod.for_distributor(d1).should == [pm1]
end
end
end