From: Sven Schöling Date: Sat, 13 Apr 2019 08:54:23 +0000 (+0200) Subject: Tests zum Number-Helper X-Git-Tag: kivitendo-mebil_0.1-0~9^2~662^2~2 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=8c44628baea6c68de5b9040ea40ead168e3b1557;p=kivitendo-erp.git Tests zum Number-Helper aus odyn-ce cd783c51c4 --- diff --git a/t/helper/round.t b/t/helper/round.t new file mode 100644 index 000000000..a4c2b5ead --- /dev/null +++ b/t/helper/round.t @@ -0,0 +1,18 @@ +use Test::More tests => 9; + +use lib 't'; + +use SL::Helper::Number qw(:all); + +use_ok 'Support::TestSetup'; + +Support::TestSetup::login(); + +is(_round_number('3.231',2),'3.23'); +is(_round_number('3.234',2),'3.23'); +is(_round_number('3.235',2),'3.24'); +is(_round_number('5.786',2),'5.79'); +is(_round_number('2.342',2),'2.34'); +is(_round_number('1.2345',2),'1.23'); +is(_round_number('8.2345',2),'8.23'); +is(_round_number('8.2350',2),'8.24');