summaryrefslogtreecommitdiffstats
path: root/test/unit/issue_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-07-11 19:35:40 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-07-11 19:35:40 +0000
commit80b1a73ccf5b536db55ffe4e88833e1d4c78bccb (patch)
tree6f9b2b4abf5d03298df469836732141dc5afe13c /test/unit/issue_test.rb
parentf3d1aa53599a01a3a9f47169d626339d912c774c (diff)
downloadredmine-80b1a73ccf5b536db55ffe4e88833e1d4c78bccb.tar.gz
redmine-80b1a73ccf5b536db55ffe4e88833e1d4c78bccb.zip
Adds 'assigned-to-my-group' css class to issues that are assigned to a user's group (#12681).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12006 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/issue_test.rb')
-rw-r--r--test/unit/issue_test.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb
index ecebb262e..ce5c50ac7 100644
--- a/test/unit/issue_test.rb
+++ b/test/unit/issue_test.rb
@@ -2169,6 +2169,18 @@ class IssueTest < ActiveSupport::TestCase
assert_include 'priority-highest', classes
end
+ def test_css_classes_should_include_user_assignment
+ issue = Issue.generate(:assigned_to_id => 2)
+ assert_include 'assigned-to-me', issue.css_classes(User.find(2))
+ assert_not_include 'assigned-to-me', issue.css_classes(User.find(3))
+ end
+
+ def test_css_classes_should_include_user_group_assignment
+ issue = Issue.generate(:assigned_to_id => 10)
+ assert_include 'assigned-to-my-group', issue.css_classes(Group.find(10).users.first)
+ assert_not_include 'assigned-to-my-group', issue.css_classes(User.find(3))
+ end
+
def test_save_attachments_with_hash_should_save_attachments_in_keys_order
set_tmp_attachments_directory
issue = Issue.generate!