diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-11-29 12:47:22 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2020-11-29 12:47:22 +0000 |
commit | 7dcc124d31b005868109faaebbcef7efa1251c7a (patch) | |
tree | 4c2ae2c9df253a2cd58cac8d11ad199a8890a264 /test | |
parent | 11ab4d621355b4a4a3ddfa4fe2e15d544f52de8b (diff) | |
download | redmine-7dcc124d31b005868109faaebbcef7efa1251c7a.tar.gz redmine-7dcc124d31b005868109faaebbcef7efa1251c7a.zip |
fix source indent of test/integration/api_test/wiki_pages_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20507 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/integration/api_test/wiki_pages_test.rb | 77 |
1 files changed, 63 insertions, 14 deletions
diff --git a/test/integration/api_test/wiki_pages_test.rb b/test/integration/api_test/wiki_pages_test.rb index 17337d9d8..6c275ab76 100644 --- a/test/integration/api_test/wiki_pages_test.rb +++ b/test/integration/api_test/wiki_pages_test.rb @@ -105,9 +105,16 @@ class Redmine::ApiTest::WikiPagesTest < Redmine::ApiTest::Base test "PUT /projects/:project_id/wiki/:title.xml should update wiki page" do assert_no_difference 'WikiPage.count' do assert_difference 'WikiContent::Version.count' do - put '/projects/ecookbook/wiki/CookBook_documentation.xml', - :params => {:wiki_page => {:text => 'New content from API', :comments => 'API update'}}, + put( + '/projects/ecookbook/wiki/CookBook_documentation.xml', + :params => { + :wiki_page => { + :text => 'New content from API', + :comments => 'API update' + } + }, :headers => credentials('jsmith') + ) assert_response :no_content end end @@ -122,9 +129,17 @@ class Redmine::ApiTest::WikiPagesTest < Redmine::ApiTest::Base test "PUT /projects/:project_id/wiki/:title.xml with current versino should update wiki page" do assert_no_difference 'WikiPage.count' do assert_difference 'WikiContent::Version.count' do - put '/projects/ecookbook/wiki/CookBook_documentation.xml', - :params => {:wiki_page => {:text => 'New content from API', :comments => 'API update', :version => '3'}}, + put( + '/projects/ecookbook/wiki/CookBook_documentation.xml', + :params => { + :wiki_page => { + :text => 'New content from API', + :comments => 'API update', + :version => '3' + } + }, :headers => credentials('jsmith') + ) assert_response :no_content end end @@ -139,9 +154,17 @@ class Redmine::ApiTest::WikiPagesTest < Redmine::ApiTest::Base test "PUT /projects/:project_id/wiki/:title.xml with stale version should respond with 409" do assert_no_difference 'WikiPage.count' do assert_no_difference 'WikiContent::Version.count' do - put '/projects/ecookbook/wiki/CookBook_documentation.xml', - :params => {:wiki_page => {:text => 'New content from API', :comments => 'API update', :version => '2'}}, + put( + '/projects/ecookbook/wiki/CookBook_documentation.xml', + :params => { + :wiki_page => { + :text => 'New content from API', + :comments => 'API update', + :version => '2' + } + }, :headers => credentials('jsmith') + ) assert_response 409 end end @@ -150,9 +173,16 @@ class Redmine::ApiTest::WikiPagesTest < Redmine::ApiTest::Base test "PUT /projects/:project_id/wiki/:title.xml should create the page if it does not exist" do assert_difference 'WikiPage.count' do assert_difference 'WikiContent::Version.count' do - put '/projects/ecookbook/wiki/New_page_from_API.xml', - :params => {:wiki_page => {:text => 'New content from API', :comments => 'API create'}}, + put( + '/projects/ecookbook/wiki/New_page_from_API.xml', + :params => { + :wiki_page => { + :text => 'New content from API', + :comments => 'API create' + } + }, :headers => credentials('jsmith') + ) assert_response 201 end end @@ -171,10 +201,21 @@ class Redmine::ApiTest::WikiPagesTest < Redmine::ApiTest::Base attachment = Attachment.create!(:file => uploaded_test_file("testfile.txt", "text/plain"), :author_id => 2) assert_difference 'WikiPage.count' do assert_difference 'WikiContent::Version.count' do - put '/projects/ecookbook/wiki/New_page_from_API.xml', - :params => {:wiki_page => {:text => 'New content from API with Attachments', :comments => 'API create with Attachments', - :uploads => [:token => attachment.token, :filename => 'testfile.txt', :content_type => "text/plain"]}}, - :headers => credentials('jsmith') + put( + '/projects/ecookbook/wiki/New_page_from_API.xml', + :params => { + :wiki_page => { + :text => 'New content from API with Attachments', + :comments => 'API create with Attachments', + :uploads => [ + :token => attachment.token, + :filename => 'testfile.txt', + :content_type => "text/plain" + ] + } + }, + :headers => credentials('jsmith') + ) assert_response 201 end end @@ -188,9 +229,17 @@ class Redmine::ApiTest::WikiPagesTest < Redmine::ApiTest::Base test "PUT /projects/:project_id/wiki/:title.xml with parent" do assert_difference 'WikiPage.count' do assert_difference 'WikiContent::Version.count' do - put '/projects/ecookbook/wiki/New_subpage_from_API.xml', - :params => {:wiki_page => {:parent_title => 'CookBook_documentation', :text => 'New content from API', :comments => 'API create'}}, + put( + '/projects/ecookbook/wiki/New_subpage_from_API.xml', + :params => { + :wiki_page => { + :parent_title => 'CookBook_documentation', + :text => 'New content from API', + :comments => 'API create' + } + }, :headers => credentials('jsmith') + ) assert_response 201 end end |