Some cleanup... don't remember where it came from
[dbsrgits/DBIx-Class.git] / t / 746mssql.t
index 7812d11..2ee8cc3 100644 (file)
@@ -161,13 +161,14 @@ lives_ok {
   $row = $rs->create({ amount => 100 });
 } 'inserted a money value';
 
-is int($rs->find($row->id)->amount), 100, 'money value round-trip';
+cmp_ok $rs->find($row->id)->amount, '==', 100, 'money value round-trip';
 
 lives_ok {
   $row->update({ amount => 200 });
 } 'updated a money value';
 
-is int($rs->find($row->id)->amount), 200, 'updated money value round-trip';
+cmp_ok $rs->find($row->id)->amount, '==', 200,
+  'updated money value round-trip';
 
 lives_ok {
   $row->update({ amount => undef });
@@ -197,6 +198,8 @@ SQL
 });
 
 lives_ok ( sub {
+  # start a new connection, make sure rebless works
+  my $schema = DBICTest::Schema->connect($dsn, $user, $pass);
   $schema->populate ('Owners', [
     [qw/id  name  /],
     [qw/1   wiggle/],
@@ -218,6 +221,8 @@ lives_ok ( sub {
 }, 'populate with PKs supplied ok' );
 
 lives_ok ( sub {
+  # start a new connection, make sure rebless works
+  my $schema = DBICTest::Schema->connect($dsn, $user, $pass);
   $schema->populate ('BooksInLibrary', [
     [qw/source  owner title   /],
     [qw/Library 1     secrets0/],