Add budget image to Budget and image factories and model
This commit is contained in:
committed by
Javi Martín
parent
443c5e0a53
commit
f4973498be
@@ -8,6 +8,10 @@ FactoryBot.define do
|
||||
association :imageable, factory: :proposal
|
||||
end
|
||||
|
||||
trait :budget_image do
|
||||
association :imageable, factory: :budget
|
||||
end
|
||||
|
||||
trait :budget_investment_image do
|
||||
association :imageable, factory: :budget_investment
|
||||
end
|
||||
|
||||
@@ -6,6 +6,7 @@ describe Budget do
|
||||
it_behaves_like "sluggable", updatable_slug_trait: :drafting
|
||||
it_behaves_like "reportable"
|
||||
it_behaves_like "globalizable", :budget
|
||||
it_behaves_like "acts as imageable", :budget_image
|
||||
|
||||
describe "scopes" do
|
||||
describe ".open" do
|
||||
|
||||
@@ -2,6 +2,7 @@ require "rails_helper"
|
||||
|
||||
describe Image do
|
||||
it_behaves_like "image validations", "budget_investment_image"
|
||||
it_behaves_like "image validations", "budget_image"
|
||||
it_behaves_like "image validations", "proposal_image"
|
||||
|
||||
it "stores attachments with Active Storage" do
|
||||
|
||||
Reference in New Issue
Block a user