Add main link to each phase of the budget

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 43ad69bbaf
commit db9ac79e05
16 changed files with 99 additions and 2 deletions

View File

@@ -55,5 +55,21 @@ describe "Admin budget phases" do
expect(page).to have_content "Changes saved"
end
scenario "shows CTA link in public site if added" do
visit edit_admin_budget_budget_phase_path(budget, budget.current_phase)
expect(page).to have_content "Main call to action (optional)"
fill_in "Text on the link", with: "Link on the phase"
fill_in "The link takes you to (add a link)", with: "https://consulproject.org"
click_button "Save changes"
expect(page).to have_content("Changes saved")
visit budgets_path
expect(page).to have_link("Link on the phase", href: "https://consulproject.org")
end
end
end