- '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:
- '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.
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