mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-28 21:07:16 +00:00
15 lines
400 B
Ruby
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
|