summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-07-29 17:49:53 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-07-29 17:49:53 +0000
commit41e7210210b5e50bf57bbcf41259a4d343bba1f0 (patch)
tree884f572467d67a31084357a290b52c4e7d35d81e /test/unit
parentd2b505b2c33217971ca965b0af9ab6f78e5c11ba (diff)
downloadredmine-41e7210210b5e50bf57bbcf41259a4d343bba1f0.tar.gz
redmine-41e7210210b5e50bf57bbcf41259a4d343bba1f0.zip
Fixed an error when member's project is nil (#17486).
git-svn-id: http://svn.redmine.org/redmine/trunk@13334 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/member_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/member_test.rb b/test/unit/member_test.rb
index 6ba9717c4..124aa3719 100644
--- a/test/unit/member_test.rb
+++ b/test/unit/member_test.rb
@@ -94,6 +94,16 @@ class MemberTest < ActiveSupport::TestCase
assert !member.save
end
+ def test_set_issue_category_nil_should_handle_nil_values
+ m = Member.new
+ assert_nil m.user
+ assert_nil m.project
+
+ assert_nothing_raised do
+ m.set_issue_category_nil
+ end
+ end
+
def test_destroy
category1 = IssueCategory.find(1)
assert_equal @jsmith.user.id, category1.assigned_to_id