Bugzilla – Attachment 42223 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]
Bug 7634: Add tests
Bug-7634-Add-tests.patch (text/plain), 2.63 KB, created by
Jonathan Druart
on 2015-09-02 13:47:57 UTC
(
hide
)
Description:
Bug 7634: Add tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-09-02 13:47:57 UTC
Size:
2.63 KB
patch
obsolete
>From ba8335ea86352f37a7efddcbc0a242fd7864eb5e 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 > >--- > 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.1.0
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