Mercurial > hg > soundsoftware-site
diff test/unit/wiki_test.rb @ 1337:077b8890835a cannam
Merge from live branch
author | Chris Cannam |
---|---|
date | Thu, 20 Jun 2013 13:14:02 +0100 |
parents | bb32da3bea34 |
children | 4f746d8966dd 51364c0cd58f |
line wrap: on
line diff
--- a/test/unit/wiki_test.rb Fri Jun 14 11:30:07 2013 +0100 +++ b/test/unit/wiki_test.rb Thu Jun 20 13:14:02 2013 +0100 @@ -1,7 +1,7 @@ # encoding: utf-8 # # Redmine - project management software -# Copyright (C) 2006-2011 Jean-Philippe Lang +# Copyright (C) 2006-2012 Jean-Philippe Lang # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -56,7 +56,7 @@ def test_find_page_with_backslashes wiki = Wiki.find(1) - page = WikiPage.generate!(:wiki => wiki, :title => '2009\\02\\09') + page = WikiPage.create!(:wiki => wiki, :title => '2009\\02\\09') assert_equal page, wiki.find_page('2009\\02\\09') end @@ -78,8 +78,10 @@ end def test_titleize + ja_test = "\xe3\x83\x86\xe3\x82\xb9\xe3\x83\x88" + ja_test.force_encoding('UTF-8') if ja_test.respond_to?(:force_encoding) assert_equal 'Page_title_with_CAPITALES', Wiki.titleize('page title with CAPITALES') - assert_equal 'テスト', Wiki.titleize('テスト') + assert_equal ja_test, Wiki.titleize(ja_test) end context "#sidebar" do