introduce organizations
This commit is contained in:
parent
bf54487a19
commit
8edf896d86
21 changed files with 345 additions and 4 deletions
19
spec/models/organization_spec.rb
Normal file
19
spec/models/organization_spec.rb
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue