Added photo model
This commit is contained in:
parent
0f697f3dbe
commit
69ddea47dd
6 changed files with 62 additions and 1 deletions
14
spec/models/photo_spec.rb
Normal file
14
spec/models/photo_spec.rb
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe Photo do
|
||||
describe 'validations' do
|
||||
|
||||
it 'has a valid factory' do
|
||||
expect(build(:photo)).to be_valid
|
||||
end
|
||||
|
||||
it 'is not valid without a picture' do
|
||||
should validate_presence_of(:picture)
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue