Add EnterpriseFee model

This commit is contained in:
Rohan Mitchell
2012-11-15 13:42:55 +11:00
parent 9cb5ac95ff
commit 192d4993a1
5 changed files with 116 additions and 75 deletions

View File

@@ -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) }

View 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