projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Typo
[kivitendo-erp.git]
/
t
/
db_helper
/
with_transaction.t
diff --git
a/t/db_helper/with_transaction.t
b/t/db_helper/with_transaction.t
index
3071cc3
..
cc3fc0e
100644
(file)
--- a/
t/db_helper/with_transaction.t
+++ b/
t/db_helper/with_transaction.t
@@
-10,7
+10,7
@@
use Carp;
use Data::Dumper;
use Support::TestSetup;
use SL::DB::Part;
use Data::Dumper;
use Support::TestSetup;
use SL::DB::Part;
-use SL::Dev::Part;
+use SL::Dev::Part
qw(new_part)
;
Support::TestSetup::login();
Support::TestSetup::login();
@@
-21,7
+21,7
@@
local $SIG{__WARN__} = sub {};
# test simple transaction
# test simple transaction
-my $part =
create
_part();
+my $part =
new
_part();
SL::DB->client->with_transaction(sub {
$part->save;
ok 1, 'part saved';
SL::DB->client->with_transaction(sub {
$part->save;
ok 1, 'part saved';
@@
-31,7
+31,7
@@
SL::DB->client->with_transaction(sub {
};
# test failing transaction
};
# test failing transaction
-my $part2 =
create
_part(partnumber => $part->partnumber); # woops, duplicate partnumber
+my $part2 =
new
_part(partnumber => $part->partnumber); # woops, duplicate partnumber
SL::DB->client->with_transaction(sub {
$part2->save;
ok 0, 'part saved';
SL::DB->client->with_transaction(sub {
$part2->save;
ok 0, 'part saved';
@@
-55,7
+55,7
@@
dies_ok {
# TODO - not possible to test without locally adding hooks in run time
# test if error gets correctly stored in db->error
# TODO - not possible to test without locally adding hooks in run time
# test if error gets correctly stored in db->error
-$part2 =
create
_part(partnumber => $part->partnumber); # woops, duplicate partnumber
+$part2 =
new
_part(partnumber => $part->partnumber); # woops, duplicate partnumber
SL::DB->client->with_transaction(sub {
$part2->save;
ok 0, 'part saved';
SL::DB->client->with_transaction(sub {
$part2->save;
ok 0, 'part saved';