Bugzilla – Attachment 42496 Details for
Bug 7634
Permanent Location (shelving location) is NULL when Import MARC records tool is used
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 7634: Add tests
PASSED-QA-Bug-7634-Add-tests.patch (text/plain), 2.76 KB, created by
Katrin Fischer
on 2015-09-13 15:34:11 UTC
(
hide
)
Description:
[PASSED QA] Bug 7634: Add tests
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2015-09-13 15:34:11 UTC
Size:
2.76 KB
patch
obsolete
>From 8106a1321fa93812591b606822f2c8772f6ba4ef Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 2 Sep 2015 14:46:02 +0100 >Subject: [PATCH] [PASSED QA] Bug 7634: Add tests > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > t/db_dependent/Items.t | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Items.t b/t/db_dependent/Items.t >index c6d4ccc..d18471d 100755 >--- a/t/db_dependent/Items.t >+++ b/t/db_dependent/Items.t >@@ -34,10 +34,11 @@ BEGIN { > my $dbh = C4::Context->dbh; > my $branches = GetBranches; > my ($branch1, $branch2) = keys %$branches; >+my $location = 'My Location'; > > subtest 'General Add, Get and Del tests' => sub { > >- plan tests => 6; >+ plan tests => 10; > > # Start transaction > $dbh->{AutoCommit} = 0; >@@ -48,7 +49,7 @@ subtest 'General Add, Get and Del tests' => sub { > my ($bibnum, $bibitemnum) = get_biblio(); > > # Add an item. >- my ($item_bibnum, $item_bibitemnum, $itemnumber) = AddItem({ homebranch => $branch1, holdingbranch => $branch1 } , $bibnum); >+ my ($item_bibnum, $item_bibitemnum, $itemnumber) = AddItem({ homebranch => $branch1, holdingbranch => $branch1, location => $location } , $bibnum); > cmp_ok($item_bibnum, '==', $bibnum, "New item is linked to correct biblionumber."); > cmp_ok($item_bibitemnum, '==', $bibitemnum, "New item is linked to correct biblioitemnumber."); > >@@ -56,6 +57,8 @@ subtest 'General Add, Get and Del tests' => sub { > my $getitem = GetItem($itemnumber); > cmp_ok($getitem->{'itemnumber'}, '==', $itemnumber, "Retrieved item has correct itemnumber."); > cmp_ok($getitem->{'biblioitemnumber'}, '==', $item_bibitemnum, "Retrieved item has correct biblioitemnumber."); >+ is( $getitem->{location}, $location, "The location should not have been modified" ); >+ is( $getitem->{permanent_location}, $location, "The permanent_location should have been set to the location value" ); > > # Modify item; setting barcode. > ModItem({ barcode => '987654321' }, $bibnum, $itemnumber); >@@ -67,6 +70,11 @@ subtest 'General Add, Get and Del tests' => sub { > my $getdeleted = GetItem($itemnumber); > is($getdeleted->{'itemnumber'}, undef, "Item deleted as expected."); > >+ ($item_bibnum, $item_bibitemnum, $itemnumber) = AddItem({ homebranch => $branch1, holdingbranch => $branch1, location => $location, permanent_location => 'my permanent location' } , $bibnum); >+ $getitem = GetItem($itemnumber); >+ is( $getitem->{location}, $location, "The location should not have been modified" ); >+ is( $getitem->{permanent_location}, 'my permanent location', "The permanent_location should not have modified" ); >+ > $dbh->rollback; > }; > >-- >1.9.1
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 7634
:
42222
|
42223
|
42224
|
42260
|
42261
|
42262
|
42495
| 42496 |
42497