From 8aeb1991b1fe3ca2fcb9df237234a95694482f0c Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Tue, 28 Oct 2025 00:52:28 +0000 Subject: [PATCH] Fix RuboCop offenses in alerts_icons_filter_test.rb (#43379). git-svn-id: https://svn.redmine.org/redmine/trunk@24082 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- .../common_mark/alerts_icons_filter_test.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test/unit/lib/redmine/wiki_formatting/common_mark/alerts_icons_filter_test.rb b/test/unit/lib/redmine/wiki_formatting/common_mark/alerts_icons_filter_test.rb index 09cd790fe..099c7a486 100644 --- a/test/unit/lib/redmine/wiki_formatting/common_mark/alerts_icons_filter_test.rb +++ b/test/unit/lib/redmine/wiki_formatting/common_mark/alerts_icons_filter_test.rb @@ -21,14 +21,14 @@ require_relative '../../../../../test_helper' if Object.const_defined?(:Commonmarker) require 'redmine/wiki_formatting/common_mark/alerts_icons_filter' - include Redmine::I18n class Redmine::WikiFormatting::CommonMark::AlertsIconsFilterTest < ActiveSupport::TestCase + include Redmine::I18n def format(markdown) Redmine::WikiFormatting::CommonMark::MarkdownFilter.to_html(markdown, Redmine::WikiFormatting::CommonMark::PIPELINE_CONFIG) end - + def filter(html) Redmine::WikiFormatting::CommonMark::AlertsIconsFilter.to_html(html, @options) end @@ -39,7 +39,7 @@ if Object.const_defined?(:Commonmarker) def teardown set_language_if_valid 'en' - end + end def test_should_render_alert_blocks_with_localized_labels set_language_if_valid 'de' @@ -49,9 +49,7 @@ if Object.const_defined?(:Commonmarker) MD html = filter(format(text)) - puts html.inspect - - expected = %r{#{I18n.translate('label_alert_note')}} + expected = %r{#{I18n.t('label_alert_note')}} assert_match expected, html end end