This commit is contained in:
Chaitanya Yadav 2017-06-04 03:21:56 +00:00 committed by GitHub
commit 2aef39f7d3

View 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