Mercurial > hg > soundsoftware-site
comparison test/unit/.svn/text-base/role_test.rb.svn-base @ 441:cbce1fd3b1b7 redmine-1.2
Update to Redmine 1.2-stable branch (Redmine SVN rev 6000)
author | Chris Cannam |
---|---|
date | Mon, 06 Jun 2011 14:24:13 +0100 |
parents | 8661b858af72 |
children |
comparison
equal
deleted
inserted
replaced
245:051f544170fe | 441:cbce1fd3b1b7 |
---|---|
1 # redMine - project management software | 1 # Redmine - project management software |
2 # Copyright (C) 2006-2008 Jean-Philippe Lang | 2 # Copyright (C) 2006-2011 Jean-Philippe Lang |
3 # | 3 # |
4 # This program is free software; you can redistribute it and/or | 4 # This program is free software; you can redistribute it and/or |
5 # modify it under the terms of the GNU General Public License | 5 # modify it under the terms of the GNU General Public License |
6 # as published by the Free Software Foundation; either version 2 | 6 # as published by the Free Software Foundation; either version 2 |
7 # of the License, or (at your option) any later version. | 7 # of the License, or (at your option) any later version. |
46 perm = role.permissions[0..1] | 46 perm = role.permissions[0..1] |
47 role.remove_permission!(*perm) | 47 role.remove_permission!(*perm) |
48 role.reload | 48 role.reload |
49 assert ! role.permissions.include?(perm[0]) | 49 assert ! role.permissions.include?(perm[0]) |
50 assert_equal size - 2, role.permissions.size | 50 assert_equal size - 2, role.permissions.size |
51 end | |
52 | |
53 def test_name | |
54 I18n.locale = 'fr' | |
55 assert_equal 'Manager', Role.find(1).name | |
56 assert_equal 'Anonyme', Role.anonymous.name | |
57 assert_equal 'Non membre', Role.non_member.name | |
51 end | 58 end |
52 | 59 |
53 context "#anonymous" do | 60 context "#anonymous" do |
54 should "return the anonymous role" do | 61 should "return the anonymous role" do |
55 role = Role.anonymous | 62 role = Role.anonymous |