Bugzilla – Attachment 42261 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]
\# Attachment to Bug 7634 - Permanent Location (shelving location) is NULL when Import MARC records tool is used
Bug-7634-Add-tests.patch (text/plain), 2.69 KB, created by
Chris Cormack
on 2015-09-03 03:28:22 UTC
(
hide
)
Description:
\# Attachment to Bug 7634 - Permanent Location (shelving location) is NULL when Import MARC records tool is used
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2015-09-03 03:28:22 UTC
Size:
2.69 KB
patch
obsolete
>From 90729fbd328c969e3b1feddb80356748e175a009 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] Bug 7634: Add tests > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >--- > 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 fb5d672..9197793 100755 >--- a/t/db_dependent/Items.t >+++ b/t/db_dependent/Items.t >@@ -33,10 +33,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; >@@ -47,7 +48,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."); > >@@ -55,6 +56,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); >@@ -66,6 +69,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; > }; > >-- >2.5.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