Bugzilla – Attachment 50494 Details for
Bug 16155
Composite keys in TestBuilder and more
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16155: [QA Follow-up] Add transaction to BiblioFrameworks.t
Bug-16155-QA-Follow-up-Add-transaction-to-BiblioFr.patch (text/plain), 1.52 KB, created by
Marcel de Rooy
on 2016-04-21 07:27:16 UTC
(
hide
)
Description:
Bug 16155: [QA Follow-up] Add transaction to BiblioFrameworks.t
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2016-04-21 07:27:16 UTC
Size:
1.52 KB
patch
obsolete
>From 9a7568ee663877407e10e08cbd86b10025b8923a Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 21 Apr 2016 09:15:19 +0200 >Subject: [PATCH] Bug 16155: [QA Follow-up] Add transaction to > BiblioFrameworks.t >Content-Type: text/plain; charset=utf-8 > >This unit test does not have a transaction. >It does not need TestBuilder. > >Test plan: >[1] Optionally remove records with mfw1, mfw2 from biblio_framework table. > If you ran this test before and it failed, you may have them. >[2] Run the test. >--- > t/db_dependent/Koha/BiblioFrameworks.t | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Koha/BiblioFrameworks.t b/t/db_dependent/Koha/BiblioFrameworks.t >index 3a6accd..d2e31d9 100644 >--- a/t/db_dependent/Koha/BiblioFrameworks.t >+++ b/t/db_dependent/Koha/BiblioFrameworks.t >@@ -21,9 +21,10 @@ use Modern::Perl; > use Test::More tests => 3; > use Koha::BiblioFramework; > use Koha::BiblioFrameworks; >-use t::lib::TestBuilder; > >-my $builder = t::lib::TestBuilder->new; >+my $schema = Koha::Database->new->schema; >+$schema->storage->txn_begin; >+ > my $nb_of_frameworks = Koha::BiblioFrameworks->search->count; > my $new_framework_1 = Koha::BiblioFramework->new({ > frameworkcode => 'mfw1', >@@ -41,3 +42,4 @@ is( $retrieved_framework_1->frameworktext, $new_framework_1->frameworktext, 'Fin > > $retrieved_framework_1->delete; > is( Koha::BiblioFrameworks->search->count, $nb_of_frameworks + 1, 'Delete should have deleted the biblio framework' ); >+$schema->storage->txn_rollback; >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16155
:
49634
|
49635
|
49636
|
49637
|
49638
|
50490
|
50491
|
50492
|
50493
|
50494
|
50518
|
50525
|
50526
|
50527
|
50528
|
50529
|
50530