From ae0206652e12d99a1a0f42a74894cdb4fef582b4 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 12 Jan 2016 07:25:57 +0100 Subject: [PATCH] passwords are write-only, cannot read them in tests --- scripts/tests/common.lua | 3 ++- scripts/tests/orders.lua | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/tests/common.lua b/scripts/tests/common.lua index 43c77f93f..49c0416a8 100644 --- a/scripts/tests/common.lua +++ b/scripts/tests/common.lua @@ -1083,7 +1083,8 @@ function test_parser() local file = io.open(filename, "w") assert_not_nil(file) - file:write('ERESSEA ' .. itoa36(f.id) .. ' "' .. f.password .. '"\n') + f.password = 'Hodor' + file:write('ERESSEA ' .. itoa36(f.id) .. ' "Hodor"\n') file:write('EINHEIT ' .. itoa36(u.id) .. "\n") file:write("BENENNEN EINHEIT 'Goldene Herde'\n") file:close() diff --git a/scripts/tests/orders.lua b/scripts/tests/orders.lua index e0d42258f..a0b03f825 100644 --- a/scripts/tests/orders.lua +++ b/scripts/tests/orders.lua @@ -73,12 +73,10 @@ function test_process_settings() f.options = 0 u:add_order("EMAIL herp@derp.com") u:add_order("BANNER 'Herpderp'") - u:add_order("PASSWORT 'HerpDerp'") u:add_order("OPTION AUSWERTUNG") eressea.process.settings() assert_equal("herp@derp.com", f.email) assert_equal("Herpderp", f.info) - assert_equal("HerpDerp", f.password) assert_equal(1, f.options) end @@ -98,7 +96,8 @@ end function test_process_quit() fno = f.id - u:add_order("STIRB '" .. u.faction.password .. "'") + u.faction.password = 'Hodor' + u:add_order("STIRB 'Hodor'") assert_not_equal(nil, _G.get_faction(fno)) eressea.process.quit() eressea.write_game('test.dat')