diff options
Diffstat (limited to 'test/unit/member_test.rb')
-rw-r--r-- | test/unit/member_test.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/test/unit/member_test.rb b/test/unit/member_test.rb index 124aa3719..f45824ce9 100644 --- a/test/unit/member_test.rb +++ b/test/unit/member_test.rb @@ -79,9 +79,8 @@ class MemberTest < ActiveSupport::TestCase member = Member.new(:project_id => 1, :user_id => user.id, :role_ids => []) assert !member.save assert_include I18n.translate('activerecord.errors.messages.empty'), member.errors[:role] - str = "R\xc3\xb4le doit \xc3\xaatre renseign\xc3\xa9(e)" - str.force_encoding('UTF-8') if str.respond_to?(:force_encoding) - assert_equal str, [member.errors.full_messages].flatten.join + assert_equal "R\xc3\xb4le doit \xc3\xaatre renseign\xc3\xa9(e)".force_encoding('UTF-8'), + [member.errors.full_messages].flatten.join end def test_validate_member_role @@ -131,7 +130,7 @@ class MemberTest < ActiveSupport::TestCase end assert m.destroyed? ensure - Member._destroy_callbacks.reject! {|c| c.filter==:destroy_test_callback} + Member._destroy_callbacks.delete(:destroy_test_callback) end def test_sort_without_roles |