Merge 214d0edb70 into 02d75ec729
This commit is contained in:
commit
2aef39f7d3
1 changed files with 16 additions and 0 deletions
16
spec/models/answer_spec.rb
Normal file
16
spec/models/answer_spec.rb
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe Answer do
|
||||
describe 'association' do
|
||||
it { should have_many :qanswers }
|
||||
it { should have_many(:questions).through(:qanswers) }
|
||||
end
|
||||
|
||||
describe 'validation' do
|
||||
it 'has valid factory' do
|
||||
expect(build(:answer)).to be_valid
|
||||
end
|
||||
|
||||
it{ is_expected.to validate_presence_of(:title) }
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue