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

@@ -819,4 +819,23 @@ LOREM_IPSUM
association :author, factory: :user
end
factory :direct_upload do
trait :proposal do
resource_type "Proposal"
end
trait :budget_investment do
resource_type "Budget::Investment"
end
trait :documents do
resource_relation "documents"
attachment { File.new("spec/fixtures/files/empty.pdf") }
end
trait :image do
resource_relation "image"
attachment { File.new("spec/fixtures/files/clippy.jpg") }
end
end
end