Fix for Bug 5818, Date picker broken on label batches
[koha.git] / t / SIP_Sip.t
blob879c9835d4c912ebb16cffcd5ea202a5e2ad21bf
1 #!/usr/bin/perl
3 # This Koha test module is a stub!
4 # Add more tests here!!!
6 use strict;
7 use warnings;
9 use Test::More tests => 4;
11 BEGIN {
12 use FindBin;
13 use lib "$FindBin::Bin/../C4/SIP";
14 use_ok('C4::SIP::Sip');
17 my $date_time = Sip::timestamp();
18 like( $date_time, qr/^\d{8} \d{6}$/, 'Timestamp format no param');
20 my $t = time();
22 $date_time = Sip::timestamp($t);
23 like( $date_time, qr/^\d{8} \d{6}$/, 'Timestamp format secs');
25 $date_time = Sip::timestamp('2011-01-12');
26 ok( $date_time eq '20110112 235900', 'Timestamp iso date string');