Add missing image model spec. Add shared specs to check image validations at any imageable model

This commit is contained in:
Senén Rodero Rodríguez
2017-09-15 19:02:49 +02:00
parent bb57c1a7f5
commit c6dabedb4a
13 changed files with 208 additions and 16 deletions

View File

@@ -5,7 +5,7 @@ shared_examples "document validations" do |documentable_factory|
let!(:document) { build(:document, documentable_factory.to_sym) }
let!(:documentable) { document.documentable }
let!(:maxfilesize) { max_file_size(document.documentable) }
let!(:acceptedcontenttypes) { accepted_content_types(document.documentable) }
let!(:acceptedcontenttypes) { accepted_content_types(document.documentable.class) }
it "should be valid" do
expect(document).to be_valid