Add trait to simplify image creation in specs

This commit is contained in:
Javi Martín
2019-09-22 21:29:32 +02:00
parent 52e54363ae
commit 086e960d09
11 changed files with 24 additions and 17 deletions

View File

@@ -1011,12 +1011,12 @@ describe "Admin budget investments" do
scenario "Show image and documents on investment details" do
budget_investment = create(:budget_investment,
:with_image,
:unfeasible,
unfeasibility_explanation: "It is impossible",
price: 1234,
price_first_year: 1000,
administrator: administrator)
create(:image, imageable: budget_investment)
document = create(:document, documentable: budget_investment)
visit admin_budget_budget_investments_path(budget_investment.budget)