diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-08-29 16:52:35 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-08-29 16:52:35 +0000 |
commit | 603e11d7a5aa62f923e7b013cac6c66462131232 (patch) | |
tree | fbbb204d2b92b5a87b787d56fe3f9c62cc3f259b /test/unit | |
parent | 8da5bad29516be6cbe1bc52e78837ac1ec292026 (diff) | |
download | redmine-603e11d7a5aa62f923e7b013cac6c66462131232.tar.gz redmine-603e11d7a5aa62f923e7b013cac6c66462131232.zip |
Merged 0.6 branch into trunk.
Permissions management was rewritten. Some permissions can now be specifically defined for non member and anonymous users.
This migration:
* is irreversible (please, don't forget to *backup* your database before upgrading)
* resets role's permissions (go to "Admin -> Roles & Permissions" to set them after upgrading)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@674 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r-- | test/unit/mail_handler_test.rb | 2 | ||||
-rw-r--r-- | test/unit/user_test.rb | 14 |
2 files changed, 6 insertions, 10 deletions
diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb index 8cac2d8b9..833506a16 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, :permissions, :issues, :permissions_roles, :trackers, :enumerations + fixtures :users, :projects, :roles, :members, :issues, :trackers, :enumerations FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures' CHARSET = "utf-8" diff --git a/test/unit/user_test.rb b/test/unit/user_test.rb index 66cd72472..52776c62f 100644 --- a/test/unit/user_test.rb +++ b/test/unit/user_test.rb @@ -88,16 +88,12 @@ class UserTest < Test::Unit::TestCase end def test_rss_key - assert_nil @jsmith.rss_key - key = @jsmith.get_or_create_rss_key - assert_kind_of Token, key - assert_equal 40, key.value.length + assert_nil @jsmith.rss_token + key = @jsmith.rss_key + assert_equal 40, key.length @jsmith.reload - assert_equal key.value, @jsmith.get_or_create_rss_key.value - - @jsmith.reload - assert_equal key.value, @jsmith.rss_key.value + assert_equal key, @jsmith.rss_key end def test_role_for_project @@ -107,6 +103,6 @@ class UserTest < Test::Unit::TestCase assert_equal "Manager", role.name # user with no role - assert_nil @dlopper.role_for_project(Project.find(2)) + assert !@dlopper.role_for_project(Project.find(2)).member? end end |