summaryrefslogtreecommitdiffstats
path: root/test/unit/project_test.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2018-07-22 05:02:12 +0000
committerGo MAEDA <maeda@farend.jp>2018-07-22 05:02:12 +0000
commit81fcc06d55917d5d4548a03688caa3e30699a52d (patch)
tree6a4ad3236dd296354cb7bda51446d12f93dbd59b /test/unit/project_test.rb
parent26f4b5181f4d2b44ccaf74c6f29af225420e0d8a (diff)
downloadredmine-81fcc06d55917d5d4548a03688caa3e30699a52d.tar.gz
redmine-81fcc06d55917d5d4548a03688caa3e30699a52d.zip
Add CSS class to identify public projects (#28413).
Patch by Sho HASHIMOTO. git-svn-id: http://svn.redmine.org/redmine/trunk@17452 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/project_test.rb')
-rw-r--r--test/unit/project_test.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/unit/project_test.rb b/test/unit/project_test.rb
index ec28b4db8..23fadd2d5 100644
--- a/test/unit/project_test.rb
+++ b/test/unit/project_test.rb
@@ -1006,18 +1006,27 @@ class ProjectTest < ActiveSupport::TestCase
assert_kind_of String, p.css_classes
assert_not_include 'archived', p.css_classes.split
assert_not_include 'closed', p.css_classes.split
+ assert_include 'public', p.css_classes.split
end
def test_css_classes_for_archived_project
p = Project.new
p.status = Project::STATUS_ARCHIVED
assert_include 'archived', p.css_classes.split
+ assert_include 'public', p.css_classes.split
end
def test_css_classes_for_closed_project
p = Project.new
p.status = Project::STATUS_CLOSED
assert_include 'closed', p.css_classes.split
+ assert_include 'public', p.css_classes.split
+ end
+
+ def test_css_classes_for_private_project
+ p = Project.new
+ p.is_public = false
+ assert_not_include 'public', p.css_classes.split
end
def test_combination_of_visible_and_distinct_scopes_in_case_anonymous_group_has_memberships_should_not_error