X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=t%2Fdb_dependent%2FKoha%2FItemTypes.t;h=8645229db43fd768fe74982546a291a3a4a89332;hb=7d8b96803f664d86762a6afb966051f7d565c40e;hp=ac239b3fc34b13f5cc386882ba017861e4e77939;hpb=6d76f61a6b0b6b429246c5a9398ec55f97d98027;p=srvgit diff --git a/t/db_dependent/Koha/ItemTypes.t b/t/db_dependent/Koha/ItemTypes.t index ac239b3fc3..8645229db4 100755 --- a/t/db_dependent/Koha/ItemTypes.t +++ b/t/db_dependent/Koha/ItemTypes.t @@ -4,29 +4,34 @@ # # This file is part of Koha. # -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 3 of the License, or (at your option) any later -# version. +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. # -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. # -# You should have received a copy of the GNU General Public License along -# with Koha; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . use Modern::Perl; -use Test::More tests => 24; use Data::Dumper; -use Koha::Database; +use Test::More tests => 24; + use t::lib::Mocks; -use Koha::Items; -use Koha::Biblioitems; use t::lib::TestBuilder; +use C4::Calendar; +use Koha::Biblioitems; +use Koha::Libraries; +use Koha::Database; +use Koha::DateUtils qw(dt_from_string);; +use Koha::Items; + BEGIN { use_ok('Koha::ItemType'); use_ok('Koha::ItemTypes'); @@ -46,6 +51,8 @@ Koha::ItemType->new( summary => 'summary', checkinmsg => 'checkinmsg', checkinmsgtype => 'checkinmsgtype', + processfee => '0.00', + defaultreplacecost => '0.00', } )->store; @@ -58,6 +65,8 @@ Koha::ItemType->new( summary => 'summary', checkinmsg => 'checkinmsg', checkinmsgtype => 'checkinmsgtype', + processfee => '0.00', + defaultreplacecost => '0.00', } )->store; @@ -70,6 +79,8 @@ Koha::ItemType->new( summary => 'summary', checkinmsg => 'checkinmsg', checkinmsgtype => 'checkinmsgtype', + processfee => '0.00', + defaultreplacecost => '0.00', } )->store; @@ -102,7 +113,7 @@ my $type = Koha::ItemTypes->find('type1'); ok( defined($type), 'first result' ); is( $type->itemtype, 'type1', 'itemtype/code' ); is( $type->description, 'description', 'description' ); -is( $type->rentalcharge, '0.0000', 'rentalcharge' ); +is( $type->rentalcharge+0, 0, 'rentalcharge' ); is( $type->imageurl, 'imageurl', 'imageurl' ); is( $type->summary, 'summary', 'summary' ); is( $type->checkinmsg, 'checkinmsg', 'checkinmsg' ); @@ -112,7 +123,7 @@ $type = Koha::ItemTypes->find('type2'); ok( defined($type), 'second result' ); is( $type->itemtype, 'type2', 'itemtype/code' ); is( $type->description, 'description', 'description' ); -is( $type->rentalcharge, '0.0000', 'rentalcharge' ); +is( $type->rentalcharge+0, 0, 'rentalcharge' ); is( $type->imageurl, 'imageurl', 'imageurl' ); is( $type->summary, 'summary', 'summary' ); is( $type->checkinmsg, 'checkinmsg', 'checkinmsg' );