Allow attaching an image to budget phases

Co-authored-by: decabeza <alberto@decabeza.es>
This commit is contained in:
Julian Herrero
2020-03-16 12:54:00 +01:00
committed by taitus
parent dcad390933
commit 43ad69bbaf
9 changed files with 56 additions and 5 deletions

View File

@@ -42,5 +42,18 @@ describe "Admin budget phases" do
expect(page).not_to have_content "Accepting projects"
end
end
scenario "shows successful notice when updating the phase with a valid image" do
visit edit_admin_budget_budget_phase_path(budget, budget.current_phase)
imageable_attach_new_file(
"budget_phase_image",
Rails.root.join("spec/fixtures/files/clippy.jpg")
)
click_on "Save changes"
expect(page).to have_content "Changes saved"
end
end
end