Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-12-10 18:08:42 +0300
committerRémy Coutable <remy@rymai.me>2018-12-10 18:08:58 +0300
commitf233c3bce08acc99d98d79f6b357e437aad3146e (patch)
treefec0f8e2726fa6c06a2d531956985a84999e4e59 /spec/lib/gitlab/utils_spec.rb
parent80eebd8e33c5f2f26bc0fdd233d9d92c51edd242 (diff)
Fix a frozen string error in lib/gitlab/utils.rb
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/lib/gitlab/utils_spec.rb')
-rw-r--r--spec/lib/gitlab/utils_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/lib/gitlab/utils_spec.rb b/spec/lib/gitlab/utils_spec.rb
index 47a5fd0bdb4..f5a4b7e2ebf 100644
--- a/spec/lib/gitlab/utils_spec.rb
+++ b/spec/lib/gitlab/utils_spec.rb
@@ -44,6 +44,12 @@ describe Gitlab::Utils do
end
end
+ describe '.nlbr' do
+ it 'replaces new lines with <br>' do
+ expect(described_class.nlbr("<b>hello</b>\n<i>world</i>".freeze)).to eq("hello<br>world")
+ end
+ end
+
describe '.remove_line_breaks' do
using RSpec::Parameterized::TableSyntax