diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2022-05-16 21:29:04 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2022-05-16 21:29:04 +0000 |
commit | a25459d5d3a1ba0c7a395d3bebae8558f1b6732b (patch) | |
tree | ca7e7cf818ca590c3b0e20e970f63e23c7b40cbc /test | |
parent | da68e9dbc8aa789adf773e04bf7db8443d841af1 (diff) | |
download | redmine-a25459d5d3a1ba0c7a395d3bebae8558f1b6732b.tar.gz redmine-a25459d5d3a1ba0c7a395d3bebae8558f1b6732b.zip |
Merged r21578-r21580 to 5.0-stable (#37053).
git-svn-id: https://svn.redmine.org/redmine/branches/5.0-stable@21581 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/system/issues_test.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/system/issues_test.rb b/test/system/issues_test.rb index 2476dc43e..5179c6e80 100644 --- a/test/system/issues_test.rb +++ b/test/system/issues_test.rb @@ -256,6 +256,26 @@ class IssuesSystemTest < ApplicationSystemTestCase assert_equal 5, issue.reload.status.id end + def test_update_issue_with_form_update_should_keep_newly_added_attachments + set_tmp_attachments_directory + log_user('jsmith', 'jsmith') + + visit '/issues/2' + page.first(:link, 'Edit').click + attach_file 'attachments[dummy][file]', Rails.root.join('test/fixtures/files/testfile.txt') + + assert page.has_css?('span#attachments_1') + + page.find("#issue_status_id").select("Closed") + + # check that attachment still exists on the page + assert page.has_css?('span#attachments_1') + + click_on 'Submit' + + assert_equal 1, Issue.find(2).attachments.count + end + test "removing issue shows confirm dialog" do log_user('jsmith', 'jsmith') visit '/issues/1' |