mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-22 05:18:51 +00:00
Add EnterpriseFee model
This commit is contained in:
@@ -20,6 +20,9 @@ FactoryGirl.define do
|
||||
is_distributor true
|
||||
end
|
||||
|
||||
factory :enterprise_fee, :class => EnterpriseFee do
|
||||
end
|
||||
|
||||
factory :product_distribution, :class => ProductDistribution do
|
||||
product { |pd| Spree::Product.first || FactoryGirl.create(:product) }
|
||||
distributor { |pd| Enterprise.is_distributor.first || FactoryGirl.create(:distributor_enterprise) }
|
||||
|
||||
11
spec/models/enterprise_fee_spec.rb
Normal file
11
spec/models/enterprise_fee_spec.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe EnterpriseFee do
|
||||
describe "associations" do
|
||||
it { should belong_to(:enterprise) }
|
||||
end
|
||||
|
||||
describe "validations" do
|
||||
it { should validate_presence_of(:name) }
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user