Bugzilla – Attachment 62384 Details for
Bug 18182
TestBuilder should be able to return Koha::Object objects
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18182: [QA Follow-up] Fix a few typos, consistent rollback
Bug-18182-QA-Follow-up-Fix-a-few-typos-consistent-.patch (text/plain), 2.29 KB, created by
Jonathan Druart
on 2017-04-19 14:48:00 UTC
(
hide
)
Description:
Bug 18182: [QA Follow-up] Fix a few typos, consistent rollback
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-04-19 14:48:00 UTC
Size:
2.29 KB
patch
obsolete
>From a8da733380b6cefa4d04f3cd1e1f667e612d36e5 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 31 Mar 2017 13:32:55 +0200 >Subject: [PATCH] Bug 18182: [QA Follow-up] Fix a few typos, consistent > rollback > >Since we here only use one rollback and this test does not care, it is >more consistent to keep that pattern. >Additionally, promoting two globals to our. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/db_dependent/TestBuilder.t | 15 +++++---------- > 1 file changed, 5 insertions(+), 10 deletions(-) > >diff --git a/t/db_dependent/TestBuilder.t b/t/db_dependent/TestBuilder.t >index 2a1ab17..a57d94b 100644 >--- a/t/db_dependent/TestBuilder.t >+++ b/t/db_dependent/TestBuilder.t >@@ -30,9 +30,9 @@ BEGIN { > use_ok('t::lib::TestBuilder'); > } > >-my $schema = Koha::Database->new->schema; >+our $schema = Koha::Database->new->schema; > $schema->storage->txn_begin; >-my $builder; >+our $builder; > > > subtest 'Start with some trivial tests' => sub { >@@ -344,14 +344,10 @@ subtest 'Default values' => sub { > is( $item->{more_subfields_xml}, 'some xml', 'Default should not overwrite assigned value' ); > }; > >-$schema->storage->txn_rollback; >- > subtest 'build_object() tests' => sub { > > plan tests => 5; > >- $schema->storage->txn_begin; >- > $builder = t::lib::TestBuilder->new(); > > my $categorycode = $builder->build( { source => 'Category' } )->{categorycode}; >@@ -368,8 +364,8 @@ subtest 'build_object() tests' => sub { > > is( ref($issuing_rule), 'Koha::IssuingRule', 'Type is correct' ); > is( $issuing_rule->categorycode, >- $categorycode, 'Firstname correctly set' ); >- is( $issuing_rule->itemtype, $itemtype, 'Firstname correctly set' ); >+ $categorycode, 'Category code correctly set' ); >+ is( $issuing_rule->itemtype, $itemtype, 'Item type correctly set' ); > > warning_is { $issuing_rule = $builder->build_object( {} ); } > { carped => 'Missing class param' }, >@@ -377,7 +373,6 @@ subtest 'build_object() tests' => sub { > is( $issuing_rule, undef, > 'If the class parameter is missing, undef is returned' ); > >- $schema->storage->txn_rollback; > }; > >-1; >+$schema->storage->txn_rollback; >-- >2.9.3
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 18182
:
60819
|
60820
|
61702
|
61752
|
61753
|
62113
|
62114
|
62121
|
62122
|
62371
|
62372
|
62373
|
62374
|
62383
| 62384 |
62385
|
62386