ok 0, 'part saved';
1;
}) or do {
- like(SL::DB->client->error, qr/duplicate key value violates unique constraint/, 'error is in db->error');
+ like(SL::DB->client->error, qr/unique.constraint/i, 'error is in db->error');
};
# test stacked transactions
1;
}) or do {
ok 1, 'sql error in nested transaction rolls back';
- like(SL::DB->client->error, qr/duplicate key value violates unique constraint/, 'error from nested transaction is in db->error');
+ like(SL::DB->client->error, qr/unique.constraint/i, 'error from nested transaction is in db->error');
};
$part->load;
$part->load;
is $part->sellprice, "3.00000", 'saved part is not affected';
-