X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F74mssql.t;h=172c78dfbb329b2fd76a69a319c58285c561fb24;hb=b75235fe460933adf4e637e6ef4c0bea5cb57aae;hp=c93aee0f28d0683b809b77dd5a8615b497049972;hpb=a33d2444e0981129eb060521de27c5e2104f37ba;p=dbsrgits%2FDBIx-Class.git diff --git a/t/74mssql.t b/t/74mssql.t index c93aee0..172c78d 100644 --- a/t/74mssql.t +++ b/t/74mssql.t @@ -18,7 +18,7 @@ my ($dsn, $user, $pass) = @ENV{map { "DBICTEST_MSSQL_${_}" } qw/DSN USER PASS/}; plan skip_all => 'Set $ENV{DBICTEST_MSSQL_DSN}, _USER and _PASS to run this test' unless ($dsn); -my $TESTS = 13; +my $TESTS = 15; plan tests => $TESTS * 2; @@ -133,6 +133,27 @@ SQL is $rs->find($row->id)->amount, undef, 'updated money value to NULL round-trip'; + + $rs->create({ amount => 300 }) for (1..3); + + # test multiple active statements + lives_ok { + my $artist_rs = $schema->resultset('Artist'); + while (my $row = $rs->next) { + my $artist = $artist_rs->next; + } + $rs->reset; + } 'multiple active statements'; + + # test multiple active statements in a transaction + TODO: { + local $TODO = 'needs similar FreeTDS fixes to the ones in Sybase.pm'; + lives_ok { + $schema->txn_do(sub { + $rs->create({ amount => 400 }); + }); + } 'simple transaction'; + } } # clean up our mess