Adds organization model
This commit is contained in:
parent
a95a03c7e5
commit
b63f3fa7c9
5 changed files with 84 additions and 10 deletions
22
spec/models/organization_spec.rb
Normal file
22
spec/models/organization_spec.rb
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe Organization do
|
||||
describe 'validations' 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
|
||||
|
||||
it 'is not valid without a website url' do
|
||||
should validate_presence_of(:website_url)
|
||||
end
|
||||
|
||||
it 'is not valid with a duplicate email' do
|
||||
should validate_uniqueness_of(:email)
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue