diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-09-14 11:34:08 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-09-14 11:34:08 +0000 |
commit | 21c97c6a1376a38a3951c57069317c17c81029f8 (patch) | |
tree | 8d38f129585767d4c1eb2c78d0b9b978aff14d70 /test | |
parent | 29348fafb7ca43cb00ef80f29e61167647df0cd8 (diff) | |
download | redmine-21c97c6a1376a38a3951c57069317c17c81029f8.tar.gz redmine-21c97c6a1376a38a3951c57069317c17c81029f8.zip |
Added project module concept.
A project module (eg. issue tracking, news, wiki,...) is a set of permissions that can enabled/disabled at project level.
For each project, modules can be enabled on the project settings view ('Modules' tab).
This requires a specific permission: 'Select project modules' (if this permission is turned off, only Redmine administrators can choose which modules a project uses).
When applying this migration, all modules are enabled for all existing projects.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@725 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/fixtures/enabled_modules.yml | 33 | ||||
-rw-r--r-- | test/functional/projects_controller_test.rb | 2 | ||||
-rw-r--r-- | test/unit/mail_handler_test.rb | 2 | ||||
-rw-r--r-- | test/unit/watcher_test.rb | 2 |
4 files changed, 36 insertions, 3 deletions
diff --git a/test/fixtures/enabled_modules.yml b/test/fixtures/enabled_modules.yml new file mode 100644 index 000000000..1f05cd9a7 --- /dev/null +++ b/test/fixtures/enabled_modules.yml @@ -0,0 +1,33 @@ +--- +enabled_modules_001: + name: issue_tracking + project_id: 1 + id: 1 +enabled_modules_002: + name: time_tracking + project_id: 1 + id: 2 +enabled_modules_003: + name: news + project_id: 1 + id: 3 +enabled_modules_004: + name: documents + project_id: 1 + id: 4 +enabled_modules_005: + name: files + project_id: 1 + id: 5 +enabled_modules_006: + name: wiki + project_id: 1 + id: 6 +enabled_modules_007: + name: repository + project_id: 1 + id: 7 +enabled_modules_008: + name: boards + project_id: 1 + id: 8 diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb index def7b7579..6f8ae1d7d 100644 --- a/test/functional/projects_controller_test.rb +++ b/test/functional/projects_controller_test.rb @@ -22,7 +22,7 @@ require 'projects_controller' class ProjectsController; def rescue_action(e) raise e end; end class ProjectsControllerTest < Test::Unit::TestCase - fixtures :projects, :users, :roles + fixtures :projects, :users, :roles, :enabled_modules def setup @controller = ProjectsController.new diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb index 833506a16..d0fc68de8 100644 --- a/test/unit/mail_handler_test.rb +++ b/test/unit/mail_handler_test.rb @@ -18,7 +18,7 @@ require File.dirname(__FILE__) + '/../test_helper' class MailHandlerTest < Test::Unit::TestCase - fixtures :users, :projects, :roles, :members, :issues, :trackers, :enumerations + fixtures :users, :projects, :enabled_modules, :roles, :members, :issues, :trackers, :enumerations FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures' CHARSET = "utf-8" diff --git a/test/unit/watcher_test.rb b/test/unit/watcher_test.rb index b8a095426..9566e6a7c 100644 --- a/test/unit/watcher_test.rb +++ b/test/unit/watcher_test.rb @@ -58,7 +58,7 @@ class WatcherTest < Test::Unit::TestCase @user.mail_notification = false @user.save @issue.reload - assert !@issue.watcher_recipients.include?(@user.mail) + assert @issue.watcher_recipients.include?(@user.mail) end def test_unwatch |