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
path: root/spec
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-12-10 19:47:15 +0300
committerDouwe Maan <douwe@gitlab.com>2018-12-10 19:47:15 +0300
commite1064f16a8230396f16b175108ac54cdfefe212f (patch)
tree567b4c465bd898e4e129f761fbce06d645c0fc04 /spec
parenteadd53b969da2704d7551069eda0b416ffb7b0e2 (diff)
parentf233c3bce08acc99d98d79f6b357e437aad3146e (diff)
Merge branch '55116-runtimeerror-can-t-modify-frozen-string' into 'master'
Fix a frozen string error in lib/gitlab/utils.rb Closes #55116 See merge request gitlab-org/gitlab-ce!23690
Diffstat (limited to 'spec')
-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