Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e2ae8801

Von Moritz Bunkus vor etwa 7 Jahren hinzugefügt

  • ID e2ae8801824477ab4d8fd2990cb3f3d5958b54fe
  • Vorgänger 61fd6cd9
  • Nachfolger e476a9df

Test with_transaction.t: deutsche und englische Fehlermeldungen erkennen

DB-Cluster sind bei uns in Deutschland normalerweise mit englischer oder
mit deutscher Locale angelegt. Daher sollte ein Test mit beiden
Sprachvarianten genügen.

Unterschiede anzeigen:

t/db_helper/with_transaction.t
61 61
  ok 0, 'part saved';
62 62
  1;
63 63
}) or do {
64
  like(SL::DB->client->error, qr/duplicate key value violates unique constraint/, 'error is in db->error');
64
  like(SL::DB->client->error, qr/unique.constraint/i, 'error is in db->error');
65 65
};
66 66

  
67 67
# test stacked transactions
......
127 127
  1;
128 128
}) or do {
129 129
  ok 1, 'sql error in nested transaction rolls back';
130
  like(SL::DB->client->error, qr/duplicate key value violates unique constraint/, 'error from nested transaction is in db->error');
130
  like(SL::DB->client->error, qr/unique.constraint/i, 'error from nested transaction is in db->error');
131 131
};
132 132

  
133 133
$part->load;
......
242 242

  
243 243
$part->load;
244 244
is $part->sellprice, "3.00000", 'saved part is not affected';
245

  

Auch abrufbar als: Unified diff