summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-09-18 01:56:43 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2019-09-18 01:56:43 +0000
commitc7c2bb2b24920c1a0c96f0fe503fcaaf3499b1b1 (patch)
tree749b37a4b19d64c9e5f5499463bcb04c7ac92dd0
parent5755bed4e1c29aed2e06c82146c6e7a12d57eb24 (diff)
downloadredmine-c7c2bb2b24920c1a0c96f0fe503fcaaf3499b1b1.tar.gz
redmine-c7c2bb2b24920c1a0c96f0fe503fcaaf3499b1b1.zip
code cleanup: rubocop: fix Lint/UselessSetterCall in test/unit/issue_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18477 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--.rubocop_todo.yml4
-rw-r--r--test/unit/issue_test.rb7
2 files changed, 6 insertions, 5 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index 3db3b51a3..93bfc869e 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -642,10 +642,6 @@ Lint/UselessAccessModifier:
Lint/UselessAssignment:
Enabled: false
-Lint/UselessSetterCall:
- Exclude:
- - 'test/unit/issue_test.rb'
-
# Configuration parameters: CheckForMethodsWithNoSideEffects.
Lint/Void:
Exclude:
diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb
index c05e1152f..f4287e48d 100644
--- a/test/unit/issue_test.rb
+++ b/test/unit/issue_test.rb
@@ -686,7 +686,12 @@ class IssueTest < ActiveSupport::TestCase
issue.expects(:project_id=).in_sequence(seq)
issue.expects(:tracker_id=).in_sequence(seq)
issue.expects(:subject=).in_sequence(seq)
- issue.attributes = {:tracker_id => 2, :project_id => 1, :subject => 'Test'}
+ assert_raise Exception do
+ issue.attributes = {:subject => 'Test'}
+ end
+ assert_nothing_raised do
+ issue.attributes = {:tracker_id => 2, :project_id => 1, :subject => 'Test'}
+ end
end
def test_assigning_tracker_and_custom_fields_should_assign_custom_fields