]> source.dussan.org Git - redmine.git/commitdiff
add new "update issue status" test to Issue system test
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 14 Oct 2019 14:51:35 +0000 (14:51 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 14 Oct 2019 14:51:35 +0000 (14:51 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@18656 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/system/issues_test.rb

index 90f2378d0636403cf75e32da9dad3964bc85a9ea..6e2753d6a4bcafa216ca8dc5cce04ca8b0664e2a 100644 (file)
@@ -219,6 +219,20 @@ class IssuesTest < ApplicationSystemTestCase
     assert_equal 'CF value', issue.custom_field_value(field)
   end
 
+  test "update issue status" do
+    issue = Issue.generate!
+    log_user('jsmith', 'jsmith')
+    visit "/issues/#{issue.id}"
+    page.first(:link, 'Edit').click
+    assert page.has_select?("issue_status_id", {:selected => "New"})
+    page.find("#issue_status_id").select("Closed")
+    assert_no_difference 'Issue.count' do
+      page.first(:button, 'Submit').click
+    end
+    assert page.has_css?('#flash_notice')
+    assert_equal 5, issue.reload.status.id
+  end
+
   test "removing issue shows confirm dialog" do
     log_user('jsmith', 'jsmith')
     visit '/issues/1'