From 395e9bd006691af2b43c0d38e8e471aff9b5337b Mon Sep 17 00:00:00 2001 From: ngyuki Date: Fri, 9 Aug 2013 14:41:52 +0900 Subject: [PATCH] Add test for editing the sidebar, including multi-byte characters. --- test/test_app.rb | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/test_app.rb b/test/test_app.rb index 5c99900b..337acab1 100644 --- a/test/test_app.rb +++ b/test/test_app.rb @@ -504,6 +504,24 @@ context "Frontend" do Precious::App.set(:wiki_options, { :js => nil }) end + test "show edit page with header and footer and sidebar of multibyte" do + post "/create", + :content => 'りんご', + :page => 'Multibyte', :format => :markdown, :message => 'mesg' + + post "/edit/Multibyte", + :content => 'りんご', :header => 'みかん', :footer => 'バナナ', :sidebar => 'スイカ', + :page => 'Multibyte', :format => :markdown, :message => 'mesg' + + get "edit/Multibyte" + + assert last_response.ok? + assert_match /りんご/, last_response.body + assert_match /みかん/, last_response.body + assert_match /バナナ/, last_response.body + assert_match /スイカ/, last_response.body + end + def app Precious::App end