Bugzilla – Attachment 127055 Details for
Bug 28948
Add a /public counterpart for the libraries REST endpoints
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28948: Fix tests
Bug-28948-Fix-tests.patch (text/plain), 2.18 KB, created by
Jonathan Druart
on 2021-10-28 13:17:18 UTC
(
hide
)
Description:
Bug 28948: Fix tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-10-28 13:17:18 UTC
Size:
2.18 KB
patch
obsolete
>From b5f1ed30e05ef549e8a09f197642a67ced665378 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 28 Oct 2021 15:16:03 +0200 >Subject: [PATCH] Bug 28948: Fix tests > >t/db_dependent/Koha/REST/Plugin/Objects.t .............. 12/13 > # Failed test 'Public representation of $library_1 is retrieved' > # at t/db_dependent/Koha/REST/Plugin/Objects.t line 546. > # Structures begin differing at: > # $got->{country} = 'cCaL3l' > # $expected->{country} = 'jcxuV1zl' > > # Failed test 'Public representation of $library_2 is retrieved' > # at t/db_dependent/Koha/REST/Plugin/Objects.t line 546. > # Structures begin differing at: > # $got->{state} = 'QVAutHLBs' > # $expected->{state} = 'hZotjENErQ' > # Looks like you failed 2 tests of 3. >--- > t/db_dependent/Koha/REST/Plugin/Objects.t | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > >diff --git a/t/db_dependent/Koha/REST/Plugin/Objects.t b/t/db_dependent/Koha/REST/Plugin/Objects.t >index 47a953a8347..9bff09d9c4d 100755 >--- a/t/db_dependent/Koha/REST/Plugin/Objects.t >+++ b/t/db_dependent/Koha/REST/Plugin/Objects.t >@@ -89,7 +89,10 @@ get '/libraries/:library_id_1/:library_id_2' => sub { > my $library_id_1 = $c->param('library_id_1'); > my $library_id_2 = $c->param('library_id_2'); > >- my $libraries_rs = Koha::Libraries->search({ branchcode => [ $library_id_1, $library_id_2 ] }); >+ my $libraries_rs = Koha::Libraries->search( >+ { branchcode => [ $library_id_1, $library_id_2 ] }, >+ { order_by => 'branchname' } >+ ); > my $libraries = $c->objects->search( $libraries_rs ); > > $c->render( >@@ -538,8 +541,8 @@ subtest 'objects.search helper, public requests' => sub { > > $schema->storage->txn_begin; > >- my $library_1 = $builder->build_object({ class => 'Koha::Libraries' }); >- my $library_2 = $builder->build_object({ class => 'Koha::Libraries' }); >+ my $library_1 = $builder->build_object({ class => 'Koha::Libraries', value => { branchname => 'A' } }); >+ my $library_2 = $builder->build_object({ class => 'Koha::Libraries', value => { branchname => 'B' } }); > > my $t = Test::Mojo->new; > >-- >2.25.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 28948
:
124479
|
124480
|
124481
|
124482
|
124483
|
124749
|
124911
|
124914
|
125901
|
125902
|
125903
|
125904
|
125905
|
125906
|
125907
|
125908
|
125911
|
125912
|
126111
|
126112
|
126113
|
126114
|
126115
|
126116
|
126117
|
126118
|
126119
|
126120
|
126121
|
126122
|
126123
|
126124
|
126125
|
126126
|
127054
|
127055