Bug 24545: Fix license statements
[srvgit] / t / db_dependent / Koha / ItemTypes.t
index ac239b3..8645229 100755 (executable)
@@ -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 <http://www.gnu.org/licenses>.
 
 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' );