introduce organizations

This commit is contained in:
shlok007 2017-05-31 18:42:52 +05:30
parent 008ccf8b6d
commit a06dc84eb0
9 changed files with 67 additions and 3 deletions

View file

@ -0,0 +1,20 @@
require 'spec_helper'
describe Organization do
let(:organization) { create(:organization) }
describe 'validation' do
it 'has a valid factory' do
expect( build(:organization) ).to be_valid
end
it 'is not valid without a name' do
should validate_presence_of(:name)
end
end
describe 'associations' do
it { should have_many(:conferences).dependent(:destroy) }
end
end