Adds sponsorship levels model
This commit is contained in:
parent
069cc0eb4c
commit
8bce579283
6 changed files with 69 additions and 9 deletions
9
spec/factories/sponsorship_levels.rb
Normal file
9
spec/factories/sponsorship_levels.rb
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# Read about factories at https://github.com/thoughtbot/factory_girl
|
||||
|
||||
FactoryGirl.define do
|
||||
factory :sponsorship_level do
|
||||
title 'Platin'
|
||||
donation_amount '$100,000'
|
||||
conference
|
||||
end
|
||||
end
|
||||
14
spec/models/sponsorship_level_spec.rb
Normal file
14
spec/models/sponsorship_level_spec.rb
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe SponsorshipLevel do
|
||||
describe 'validations' do
|
||||
|
||||
it 'has a valid factory' do
|
||||
expect(build(:sponsorship_level)).to be_valid
|
||||
end
|
||||
|
||||
it 'is not valid without a title' do
|
||||
should validate_presence_of(:title)
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue