Bugzilla – Attachment 113065 Details for
Bug 21301
Restriction of the informations given by GetRecords ILS-DI service
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21301: add unit tests
Bug-21301-add-unit-tests.patch (text/plain), 2.41 KB, created by
Fridolin Somers
on 2020-11-05 10:21:19 UTC
(
hide
)
Description:
Bug 21301: add unit tests
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2020-11-05 10:21:19 UTC
Size:
2.41 KB
patch
obsolete
>From 3eb99e890c50bce095aa4dc4dffd16845048f968 Mon Sep 17 00:00:00 2001 >From: Fridolin Somers <fridolin.somers@biblibre.com> >Date: Fri, 4 Sep 2020 10:01:20 +0200 >Subject: [PATCH] Bug 21301: add unit tests > >Run t/db_dependent/ILSDI_Services.t with and without previous patches >--- > t/db_dependent/ILSDI_Services.t | 31 ++++++++++++++++++++++++++++++- > 1 file changed, 30 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/ILSDI_Services.t b/t/db_dependent/ILSDI_Services.t >index 5e38a12df2..3ce217ba15 100755 >--- a/t/db_dependent/ILSDI_Services.t >+++ b/t/db_dependent/ILSDI_Services.t >@@ -572,7 +572,7 @@ subtest 'Holds test with start_date and end_date' => sub { > > subtest 'GetRecords' => sub { > >- plan tests => 1; >+ plan tests => 8; > > $schema->storage->txn_begin; > >@@ -591,6 +591,24 @@ subtest 'GetRecords' => sub { > } > ); > >+ my $patron = $builder->build({ >+ source => 'Borrower', >+ }); >+ >+ my $issue = $builder->build({ >+ source => 'Issue', >+ value => { >+ itemnumber => $item->itemnumber, >+ } >+ }); >+ >+ my $hold = $builder->build({ >+ source => 'Reserve', >+ value => { >+ biblionumber => $item->biblionumber, >+ } >+ }); >+ > ModItemTransfer($item->itemnumber, $branch1->{branchcode}, $branch2->{branchcode}); > > my $cgi = CGI->new; >@@ -608,6 +626,17 @@ subtest 'GetRecords' => sub { > is_deeply($reply->{record}->[0]->{items}->{item}->[0]->{transfer}, $expected, > 'GetRecords returns transfer informations'); > >+ # Check informations exposed >+ my $reply_issue = $reply->{record}->[0]->{issues}->{issue}->[0]; >+ is($reply_issue->{itemnumber}, $item->itemnumber, 'GetRecords has an issue tag'); >+ is($reply_issue->{borrowernumber}, undef, 'GetRecords does not expose borrowernumber in issue tag'); >+ is($reply_issue->{surname}, undef, 'GetRecords does not expose surname in issue tag'); >+ is($reply_issue->{firstname}, undef, 'GetRecords does not expose firstname in issue tag'); >+ is($reply_issue->{cardnumber}, undef, 'GetRecords does not expose cardnumber in issue tag'); >+ my $reply_reserve = $reply->{record}->[0]->{reserves}->{reserve}->[0]; >+ is($reply_reserve->{biblionumber}, $item->biblionumber, 'GetRecords has a reserve tag'); >+ is($reply_reserve->{borrowernumber}, undef, 'GetRecords does not expose borrowernumber in reserve tag'); >+ > $schema->storage->txn_rollback; > }; > >-- >2.29.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 21301
:
93495
|
93603
|
95158
|
95159
|
95178
|
101818
|
109646
|
113061
|
113062
|
113063
|
113064
|
113065
|
113068
|
113069
|
113070
|
113071
|
113072
|
115022
|
115023
|
115024
|
115025
|
115026