summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-10-07 11:44:42 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-10-07 11:44:42 +0000
commit6972d7e982d1383b091a6b0331983c722e687947 (patch)
treeea9a99f6f24deeeaa1d4dee178df07c82402ae09
parent557f045e422f0683225f279364a5924e4e21e14f (diff)
downloadredmine-6972d7e982d1383b091a6b0331983c722e687947.tar.gz
redmine-6972d7e982d1383b091a6b0331983c722e687947.zip
code cleanup: rubocop: fix Layout/ClosingHeredocIndentation and Layout/IndentHeredoc in test/unit/setting_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18614 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--.rubocop_todo.yml2
-rw-r--r--test/unit/setting_test.rb20
2 files changed, 9 insertions, 13 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index a785e63b4..b2aee54e2 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -93,7 +93,6 @@ Layout/ClosingHeredocIndentation:
- 'test/unit/lib/redmine/wiki_formatting/markdown_formatter_test.rb'
- 'test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb'
- 'test/unit/lib/redmine/wiki_formatting_test.rb'
- - 'test/unit/setting_test.rb'
# Cop supports --auto-correct.
Layout/ClosingParenthesisIndentation:
@@ -282,7 +281,6 @@ Layout/IndentHeredoc:
- 'test/unit/lib/redmine/wiki_formatting/markdown_formatter_test.rb'
- 'test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb'
- 'test/unit/lib/redmine/wiki_formatting_test.rb'
- - 'test/unit/setting_test.rb'
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
diff --git a/test/unit/setting_test.rb b/test/unit/setting_test.rb
index 145961539..740fecc19 100644
--- a/test/unit/setting_test.rb
+++ b/test/unit/setting_test.rb
@@ -114,20 +114,18 @@ class SettingTest < ActiveSupport::TestCase
end
def test_setting_serialied_as_binary_should_be_loaded_as_utf8_encoded_strings
- yaml = <<-YAML
----
-- keywords: !binary |
- Zml4ZXMsY2xvc2VzLNC40YHQv9GA0LDQstC70LXQvdC+LNCz0L7RgtC+0LLQ
- vizRgdC00LXQu9Cw0L3QvixmaXhlZA==
-
- done_ratio: "100"
- status_id: "5"
-YAML
-
+ yaml = <<~YAML
+ ---
+ - keywords: !binary |
+ Zml4ZXMsY2xvc2VzLNC40YHQv9GA0LDQstC70LXQvdC+LNCz0L7RgtC+0LLQ
+ vizRgdC00LXQu9Cw0L3QvixmaXhlZA==
+
+ done_ratio: "100"
+ status_id: "5"
+ YAML
Setting.commit_update_keywords = {}
assert_equal 1, Setting.where(:name => 'commit_update_keywords').update_all(:value => yaml)
Setting.clear_cache
-
assert_equal 'UTF-8', Setting.commit_update_keywords.first['keywords'].encoding.name
ensure
Setting.where(:name => 'commit_update_keywords').delete_all