Fix document validations specs

This commit is contained in:
Senén Rodero Rodríguez
2017-08-24 01:28:33 +02:00
parent 4081dded5f
commit 8e91bbe5b5
2 changed files with 4 additions and 2 deletions

View File

@@ -46,12 +46,14 @@ shared_examples "document validations" do |documentable_factory|
end
it "should not be valid without a documentable_id" do
document.save
document.documentable_id = nil
expect(document).to_not be_valid
end
it "should not be valid without a documentable_type" do
document.save
document.documentable_type = nil
expect(document).to_not be_valid