test/test_asl_userdel.rb in activesambaldap-0.0.3 vs test/test_asl_userdel.rb in activesambaldap-0.0.4
- old
+ new
@@ -7,16 +7,16 @@
super
@command = File.join(@bin_dir, "asl-userdel")
end
def test_run_as_normal_user
- assert_equal([false, "", "need root authority.\n"],
+ assert_equal([false, "", _("need root authority.") + "\n"],
run_command_as_normal_user("user-name"))
end
def test_not_exist_user
- assert_equal([false, "", "user 'not-exist' doesn't exist.\n"],
+ assert_equal([false, "", _("user doesn't exist: %s") % 'not-exist' + "\n"],
run_command("not-exist"))
end
def test_exist_user
make_dummy_user do |user, password|
@@ -36,18 +36,20 @@
end
end
def test_user_as_computer
make_dummy_user do |user, password|
- assert_equal([false, "", "computer '#{user.uid}$' doesn't exist.\n"],
+ message = _("%s doesn't exist: %s") % [_("computer"), "#{user.uid}$"]
+ assert_equal([false, "", "#{message}\n"],
run_command(user.uid, "--computer-account"))
assert(@user_class.exists?(user.uid))
end
end
def test_computer_as_user
make_dummy_computer do |computer, password|
- assert_equal([false, "", "user '#{computer.uid}' doesn't exist.\n"],
+ message = _("%s doesn't exist: %s") % [_("user"), computer.uid]
+ assert_equal([false, "", "#{message}\n"],
run_command(computer.uid))
assert(@computer_class.exists?(computer.uid))
end
end