Merge pull request #2970 from PierreMesure/Remove-icon-png-from-settings

Removed icon_home and fixed corresponding test
This commit is contained in:
Raimond Garcia
2018-11-27 11:11:51 +01:00
committed by GitHub
2 changed files with 3 additions and 4 deletions

View File

@@ -1,6 +1,5 @@
class SiteCustomization::Image < ActiveRecord::Base class SiteCustomization::Image < ActiveRecord::Base
VALID_IMAGES = { VALID_IMAGES = {
"icon_home" => [330, 240],
"logo_header" => [260, 80], "logo_header" => [260, 80],
"social_media_icon" => [470, 246], "social_media_icon" => [470, 246],
"social_media_icon_twitter" => [246, 246], "social_media_icon_twitter" => [246, 246],

View File

@@ -30,13 +30,13 @@ feature "Admin custom images" do
click_link "Custom images" click_link "Custom images"
end end
within("tr.icon_home") do within("tr.social_media_icon") do
attach_file "site_customization_image_image", "spec/fixtures/files/logo_header.png" attach_file "site_customization_image_image", "spec/fixtures/files/logo_header.png"
click_button "Update" click_button "Update"
end end
expect(page).to have_content("Width must be 330px") expect(page).to have_content("Width must be 470px")
expect(page).to have_content("Height must be 240px") expect(page).to have_content("Height must be 246px")
end end
scenario "Delete image" do scenario "Delete image" do