X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fadmin%2F03data.t;h=ee35001135736c2d91742ef90727054172a22690;hb=f8135512c346d8cb6f3dc569f4bb11576e85f97b;hp=1fe59b7dc6365672b23b5f148e04963faf0ba9fb;hpb=29fa769844f7912c9eb1687c0c1e6a200615c8ea;p=dbsrgits%2FDBIx-Class.git diff --git a/t/admin/03data.t b/t/admin/03data.t index 1fe59b7..ee35001 100644 --- a/t/admin/03data.t +++ b/t/admin/03data.t @@ -2,18 +2,17 @@ use strict; use warnings; use Test::More; - use Test::Exception; +use lib 't/lib'; +use DBICTest; + BEGIN { require DBIx::Class; plan skip_all => 'Test needs ' . DBIx::Class::Optional::Dependencies->req_missing_for('admin') unless DBIx::Class::Optional::Dependencies->req_ok_for('admin'); } -use lib 't/lib'; -use DBICTest; - use_ok 'DBIx::Class::Admin'; @@ -46,13 +45,13 @@ use_ok 'DBIx::Class::Admin'; $admin->insert('Employee', {name =>'Aran'}); - my $expected_data = [ + my $expected_data = [ [$employee->result_source->columns() ], - [1,1,undef,undef,undef,'Trout'], - [2,2,undef,undef,undef,'Aran'] + [1,1,undef,undef,undef,'Trout',undef], + [2,2,undef,undef,undef,'Aran',undef] ]; my $data; - lives_ok { $data = $admin->select('Employee')} 'can retrive data from database'; + lives_ok { $data = $admin->select('Employee', undef, { order_by => 'employee_id' })} 'can retrive data from database'; is_deeply($data, $expected_data, 'DB matches whats expected'); $admin->delete('Employee', {name=>'Trout'});