diff --git a/app/views/budgets/groups/show.html.erb b/app/views/budgets/groups/show.html.erb index f352c15da..2af9cb372 100644 --- a/app/views/budgets/groups/show.html.erb +++ b/app/views/budgets/groups/show.html.erb @@ -45,7 +45,7 @@
- <%= image_tag "map.jpg" %> + <%= image_tag(image_path_for("map.jpg")) %>
diff --git a/app/views/legislation/proposals/_geozones.html.erb b/app/views/legislation/proposals/_geozones.html.erb index 5878ef178..064f819dd 100644 --- a/app/views/legislation/proposals/_geozones.html.erb +++ b/app/views/legislation/proposals/_geozones.html.erb @@ -2,5 +2,5 @@
<%= link_to map_proposals_path, id: "map", title: t("shared.tags_cloud.districts_list") do %> - <%= image_tag("map.jpg", alt: t("shared.tags_cloud.districts_list")) %> + <%= image_tag(image_path_for("map.jpg", alt: t("shared.tags_cloud.districts_list")) %> <% end %> diff --git a/app/views/shared/_map.html.erb b/app/views/shared/_map.html.erb index 9e9e232e3..9aeaf4da5 100644 --- a/app/views/shared/_map.html.erb +++ b/app/views/shared/_map.html.erb @@ -13,7 +13,7 @@
- <%= image_tag("map.jpg", usemap: "#map") %> + <%= image_tag(image_path_for("map.jpg"), usemap: "#map") %>
diff --git a/spec/features/admin/site_customization/images_spec.rb b/spec/features/admin/site_customization/images_spec.rb index 419ea5a5a..a8dd454a5 100644 --- a/spec/features/admin/site_customization/images_spec.rb +++ b/spec/features/admin/site_customization/images_spec.rb @@ -39,7 +39,9 @@ feature "Admin custom images" do expect(page).to have_css("img[src*='custom_map.jpg']", count: 1) end - scenario "Image is replaced on front view" do + scenario "Image is replaced on front views" do + budget = create(:budget) + group = create(:budget_group, budget: budget) visit admin_root_path within("#side_menu") do @@ -56,6 +58,18 @@ feature "Admin custom images" do within("#map") do expect(page).to have_css("img[src*='custom_map.jpg']") end + + visit map_proposals_path + + within(".show-for-medium") do + expect(page).to have_css("img[src*='custom_map.jpg']") + end + + visit budget_group_path(budget, group) + + within(".show-for-medium") do + expect(page).to have_css("img[src*='custom_map.jpg']") + end end scenario "Upload invalid image" do