Skip to content

Commit f43f997

Browse files
committed
add unit testing "02-select.t"
1 parent 40b7c49 commit f43f997

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

t/02-select.t

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/perl
2+
use strict;
3+
use warnings;
4+
use Test::More;
5+
use CellBIS::SQL::Abstract;
6+
7+
my $sql_abstract = CellBIS::SQL::Abstract->new();
8+
my $select1 = $sql_abstract->select('table_test', []);
9+
my $select2 = $sql_abstract->select('table_test', [], {
10+
'orderby' => 'id_mhs_kelas',
11+
'order' => 'asc',
12+
'limit' => '5'
13+
});
14+
ok($select1 eq 'SELECT * FROM table_test', "[$select1] is true");
15+
ok($select2 eq 'SELECT * FROM table_test ORDER BY id_mhs_kelas ASC LIMIT 5', "[$select2] is true");
16+
17+
done_testing();

0 commit comments

Comments
 (0)