diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2022-01-22 10:11:13 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2022-01-22 10:11:13 +0000 |
commit | 4807beaebf192dca34ea5661df0de0acb33e2e11 (patch) | |
tree | 36478100ecd35fbdbb34f58c225cb74b01ed0b34 /test/integration | |
parent | a347d212b5e89c91e939015696ce099cb87527b7 (diff) | |
download | redmine-4807beaebf192dca34ea5661df0de0acb33e2e11.tar.gz redmine-4807beaebf192dca34ea5661df0de0acb33e2e11.zip |
Explicitly specify text formatting in the tests (#35952).
Patch by Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@21386 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration')
-rw-r--r-- | test/integration/attachments_test.rb | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/test/integration/attachments_test.rb b/test/integration/attachments_test.rb index 14c96130b..197eda6aa 100644 --- a/test/integration/attachments_test.rb +++ b/test/integration/attachments_test.rb @@ -90,28 +90,30 @@ class AttachmentsTest < Redmine::IntegrationTest token = ajax_upload('myupload.jpg', 'JPEG content') - post( - '/issues/preview', - :params => { - :issue => {:tracker_id => 1, :project_id => 'ecookbook'}, - :text => 'Inline upload: !myupload.jpg!', - :attachments => { - '1' => { - :filename => 'myupload.jpg', - :description => 'My uploaded file', - :token => token + with_settings :text_formatting => 'textile' do + post( + '/issues/preview', + :params => { + :issue => {:tracker_id => 1, :project_id => 'ecookbook'}, + :text => 'Inline upload: !myupload.jpg!', + :attachments => { + '1' => { + :filename => 'myupload.jpg', + :description => 'My uploaded file', + :token => token + } } } - } - ) - assert_response :success + ) + assert_response :success - attachment_path = response.body.match(%r{<img src="(/attachments/download/\d+/myupload.jpg)"})[1] - assert_not_nil token, "No attachment path found in response:\n#{response.body}" + attachment_path = response.body.match(%r{<img src="(/attachments/download/\d+/myupload.jpg)"})[1] + assert_not_nil token, "No attachment path found in response:\n#{response.body}" - get attachment_path - assert_response :success - assert_equal 'JPEG content', response.body + get attachment_path + assert_response :success + assert_equal 'JPEG content', response.body + end end def test_upload_and_resubmit_after_validation_failure |