Bugzilla – Attachment 162718 Details for
Bug 35963
Problem using some filters in the bundled items table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35963: Add tests
Bug-35963-Add-tests.patch (text/plain), 1.85 KB, created by
Martin Renvoize (ashimema)
on 2024-03-04 16:37:56 UTC
(
hide
)
Description:
Bug 35963: Add tests
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-03-04 16:37:56 UTC
Size:
1.85 KB
patch
obsolete
>From cc8e4d4fbd2b2571872c05a52c4ea8713553d8a8 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Wed, 7 Feb 2024 14:36:01 +0100 >Subject: [PATCH] Bug 35963: Add tests > >Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/db_dependent/api/v1/items/bundled_items.t | 48 +++++++++++++++++++++ > 1 file changed, 48 insertions(+) > create mode 100644 t/db_dependent/api/v1/items/bundled_items.t > >diff --git a/t/db_dependent/api/v1/items/bundled_items.t b/t/db_dependent/api/v1/items/bundled_items.t >new file mode 100644 >index 00000000000..cab4b23e9ab >--- /dev/null >+++ b/t/db_dependent/api/v1/items/bundled_items.t >@@ -0,0 +1,48 @@ >+#!/usr/bin/env perl >+ >+use Modern::Perl; >+ >+use Test::More tests => 1; >+use Test::MockModule; >+use Test::Mojo; >+ >+use t::lib::TestBuilder; >+use t::lib::Mocks; >+ >+use Koha::Database; >+ >+my $schema = Koha::Database->new->schema; >+my $builder = t::lib::TestBuilder->new; >+ >+t::lib::Mocks::mock_preference( 'RESTBasicAuth', 1 ); >+ >+my $t = Test::Mojo->new('Koha::REST::V1'); >+ >+subtest 'order by me.barcode should return 200' => sub { >+ plan tests => 2; >+ >+ $schema->storage->txn_begin; >+ >+ my $bundle = $builder->build_sample_item; >+ my $item = $builder->build_sample_item; >+ $bundle->add_to_bundle($item); >+ >+ my $patron = $builder->build_object( >+ { >+ class => 'Koha::Patrons', >+ value => { flags => 4 } >+ } >+ ); >+ >+ my $password = 'thePassword123'; >+ >+ $patron->set_password( { password => $password, skip_validation => 1 } ); >+ >+ my $userid = $patron->userid; >+ my $itemnumber = $bundle->itemnumber; >+ >+ $t->get_ok( "//$userid:$password@/api/v1/items/$itemnumber/bundled_items?_order_by=+me.barcode" ) >+ ->status_is(200); >+ >+ $schema->storage->txn_rollback; >+}; >-- >2.44.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 35963
:
161812
|
162521
|
162522
|
162523
| 162718 |
162719
|
162720