The config.file_watcher option still exists but it's no longer included in the default environtment file. Since we don't use it, we're removing it. The config.assets.assets.debug option is no longer true by default [1], so it isn't included anymore. The config.active_support.deprecation option is now omitted on production in favor of config.active_support.report_deprecations, which is false by default. I think it's OK to keep it this way, since we check deprecations in the development and test environments but never on production environments. As mentioned in the Rails upgrade guide, sprockets-rails is no longer a rails dependency and we need to explicitly include it in our Gemfile. The behavior of queries trying to find an invalid enum value has changed [2], so we're updating the tests accordingly. The `favicon_link_tag` method has removed the deprecated `shortcut` link type [3], so we're updating the tests accordingly. The method `raw_filter` in ActiveSupport callbacks has been renamed to `filter` [4], so we're updating the code accordingly. [1] https://github.com/rails/rails/commit/adec7e7ba87e3 [2] https://github.com/rails/rails/commit/b68f0954 [3] Pull request 43850 in https://github.com/rails/rails [4] Pull request 41598 in https://github.com/rails/rails
24 lines
773 B
Ruby
24 lines
773 B
Ruby
require "rails_helper"
|
|
|
|
describe "Site customization images" do
|
|
scenario "Custom favicon" do
|
|
create(:site_customization_image, name: "favicon", image: fixture_file_upload("favicon_custom.ico"))
|
|
|
|
visit root_path
|
|
|
|
expect(page).to have_css("link[rel='icon'][href$='favicon_custom.ico']", visible: :hidden)
|
|
end
|
|
|
|
scenario "Custom auth background" do
|
|
stub_const("#{SiteCustomization::Image}::VALID_IMAGES", { "auth_bg" => [260, 80] })
|
|
create(:site_customization_image,
|
|
name: "auth_bg",
|
|
image: fixture_file_upload("logo_header-260x80.png"))
|
|
|
|
visit new_user_session_path
|
|
|
|
expect(page).to have_css "[style*='background-image:'][style*='logo_header-260x80.png']"
|
|
expect(page).not_to have_css "[style*='auth_bg']"
|
|
end
|
|
end
|