summaryrefslogtreecommitdiffstats
path: root/test/system
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-07-05 15:03:35 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-07-05 15:03:35 +0000
commitd050d515448607798f20bb91284654ea78d26c6a (patch)
treee8bcf325201557af5ae30b8dc2457f929e03f47c /test/system
parentb0768eaff4af04cc46dfa99348f7628c42f0a36b (diff)
downloadredmine-d050d515448607798f20bb91284654ea78d26c6a.tar.gz
redmine-d050d515448607798f20bb91284654ea78d26c6a.zip
simplify IssuesSystemTest#test_bulk_watch_issues_via_context_menu
git-svn-id: http://svn.redmine.org/redmine/trunk@19860 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/system')
-rw-r--r--test/system/issues_test.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/system/issues_test.rb b/test/system/issues_test.rb
index 0dda66e44..2e9c86513 100644
--- a/test/system/issues_test.rb
+++ b/test/system/issues_test.rb
@@ -292,6 +292,11 @@ class IssuesSystemTest < ApplicationSystemTestCase
def test_bulk_watch_issues_via_context_menu
log_user('jsmith', 'jsmith')
visit '/issues'
+ jsmith = User.find_by_login('jsmith')
+ issue1 = Issue.find(1)
+ issue4 = Issue.find(4)
+ assert_not issue1.reload.watched_by?(jsmith)
+ assert_not issue4.reload.watched_by?(jsmith)
assert page.has_css?('tr#issue-1')
assert page.has_css?('tr#issue-4')
find('tr#issue-1 input[type=checkbox]').click
@@ -307,8 +312,8 @@ class IssuesSystemTest < ApplicationSystemTestCase
assert page.has_css?('tr#issue-1')
assert page.has_css?('tr#issue-4')
end
- assert Issue.find(1).watched_by?(User.find_by_login('jsmith'))
- assert Issue.find(4).watched_by?(User.find_by_login('jsmith'))
+ assert issue1.reload.watched_by?(jsmith)
+ assert issue4.reload.watched_by?(jsmith)
end
def test_bulk_update_issues