Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (17 sloc) 0.431 kb
use t::Utils;
use Mock::Basic;
use Test::More;
my $dbh = t::Utils->setup_dbh;
my $db = Mock::Basic->new({dbh => $dbh});
$db->setup_test_db;
$db->insert('mock_basic',{
id => 1,
name => 'perl',
});
subtest 'single_by_sql' => sub {
my $row = $db->single_by_sql('SELECT * from mock_basic where id = ?', [1], 'mock_basic');
isa_ok $row, 'Teng::Row';
is $row->id, 1;
is $row->name, 'perl';
};
done_testing;
Jump to Line
Something went wrong with that request. Please try again.