Adds sponsorship levels model

This commit is contained in:
Gopesh Tulsyan 2014-06-05 11:56:04 +05:30
parent 069cc0eb4c
commit 8bce579283
6 changed files with 69 additions and 9 deletions

View 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

View 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