Bugzilla – Attachment 109646 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-09-04 08:02:34 UTC
(
hide
)
Description:
Bug 21301: add unit tests
Filename:
MIME Type:
Creator:
Fridolin Somers
Created:
2020-09-04 08:02:34 UTC
Size:
2.41 KB
patch
obsolete
>From 828c015aaed448fe8d617dd917c292f24eba9832 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 3b599b67f0..7fe8e01311 100644 >--- a/t/db_dependent/ILSDI_Services.t >+++ b/t/db_dependent/ILSDI_Services.t >@@ -548,7 +548,7 @@ subtest 'Holds test with start_date and end_date' => sub { > > subtest 'GetRecords' => sub { > >- plan tests => 1; >+ plan tests => 8; > > $schema->storage->txn_begin; > >@@ -567,6 +567,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 = new CGI; >@@ -584,6 +602,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.27.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 21301
:
93495
|
93603
|
95158
|
95159
|
95178
|
101818
|
109646
|
113061
|
113062
|
113063
|
113064
|
113065
|
113068
|
113069
|
113070
|
113071
|
113072
|
115022
|
115023
|
115024
|
115025
|
115026