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:
authorAlex Braha Stoll <alexbrahastoll@gmail.com>2017-01-30 06:07:31 +0300
committerAlex Braha Stoll <alexbrahastoll@gmail.com>2017-01-30 06:07:31 +0300
commit683097666aa01ef6a5b490be67a4a0d9733152e3 (patch)
tree08ef6a71de041dd2934ecf2056f4a4e9c4076620 /spec/models/wiki_page_spec.rb
parent4c57fa4282afc1679e2891b215174c92bf883c6a (diff)
Add WikiPage.unhyphenize
Diffstat (limited to 'spec/models/wiki_page_spec.rb')
-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