summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorAlex Braha Stoll <alexbrahastoll@gmail.com>2017-01-30 01:07:31 -0200
committerAlex Braha Stoll <alexbrahastoll@gmail.com>2017-01-30 01:07:31 -0200
commit683097666aa01ef6a5b490be67a4a0d9733152e3 (patch)
tree08ef6a71de041dd2934ecf2056f4a4e9c4076620 /spec/models
parent4c57fa4282afc1679e2891b215174c92bf883c6a (diff)
downloadgitlab-ce-683097666aa01ef6a5b490be67a4a0d9733152e3.tar.gz
Add WikiPage.unhyphenize
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/wiki_page_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/wiki_page_spec.rb b/spec/models/wiki_page_spec.rb
index 109a0499090..579ebac7afb 100644
--- a/spec/models/wiki_page_spec.rb
+++ b/spec/models/wiki_page_spec.rb
@@ -68,6 +68,14 @@ describe WikiPage, models: true do
end
end
+ describe '.unhyphenize' do
+ it 'removes hyphens from a name' do
+ name = 'a-name--with-hyphens'
+
+ expect(WikiPage.unhyphenize(name)).to eq('a name with hyphens')
+ end
+ end
+
describe "#initialize" do
context "when initialized with an existing gollum page" do
before do