From bca528a57c9276c0cd815d67fed4a72c514d53a2 Mon Sep 17 00:00:00 2001 From: Hiroyuki Sato Date: Wed, 9 Apr 2014 14:14:16 +0900 Subject: Better title format for wiki page The title format for wiki page may be unintelligible. For example 'GitLab' is converted to 'Git Lab', 'MySQL' is converted to 'My Sql', etc. --- spec/models/wiki_page_spec.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'spec') diff --git a/spec/models/wiki_page_spec.rb b/spec/models/wiki_page_spec.rb index 2af164bd99b..005c513af3c 100644 --- a/spec/models/wiki_page_spec.rb +++ b/spec/models/wiki_page_spec.rb @@ -155,4 +155,20 @@ describe WikiPage do end end + describe "#title" do + before do + create_page("Title", "content") + @page = wiki.find_page("Title") + end + + after do + destroy_page("Title") + end + + it "should be replace a hyphen to a space" do + @page.title = "Import-existing-repositories-into-GitLab" + @page.title.should == "Import existing repositories into GitLab" + end + end + end -- cgit v1.2.3