Bugzilla – Attachment 172156 Details for
Bug 37856
Some SUSHI providers require the platform parameter
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37856: Add new test to test platform is correctly added to build_url
Bug-37856-Add-new-test-to-test-platform-is-correct.patch (text/plain), 2.27 KB, created by
Pedro Amorim
on 2024-09-27 18:43:17 UTC
(
hide
)
Description:
Bug 37856: Add new test to test platform is correctly added to build_url
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2024-09-27 18:43:17 UTC
Size:
2.27 KB
patch
obsolete
>From 57cae67c2051f0ed31100fa88ccbf55e97b00b90 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Fri, 27 Sep 2024 18:42:58 +0000 >Subject: [PATCH] Bug 37856: Add new test to test platform is correctly added > to build_url > >prove t/db\_dependent/Koha/ERM/EUsage/UsageDataProvider.t >--- > .../Koha/ERM/EUsage/UsageDataProvider.t | 37 ++++++++++++++++++- > 1 file changed, 36 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Koha/ERM/EUsage/UsageDataProvider.t b/t/db_dependent/Koha/ERM/EUsage/UsageDataProvider.t >index bde75ecbb75..2513b6f2477 100755 >--- a/t/db_dependent/Koha/ERM/EUsage/UsageDataProvider.t >+++ b/t/db_dependent/Koha/ERM/EUsage/UsageDataProvider.t >@@ -29,7 +29,7 @@ my $builder = t::lib::TestBuilder->new; > > subtest '_build_url_query' => sub { > >- plan tests => 1; >+ plan tests => 2; > > $schema->storage->txn_begin; > >@@ -70,6 +70,41 @@ subtest '_build_url_query' => sub { > . substr( $usage_data_provider->{end_date}, 0, 7 ) > ); > >+ my $test_platform = 'www.whatever.com'; >+ >+ my $usage_data_provider_with_platform = $builder->build_object( >+ { >+ class => 'Koha::ERM::EUsage::UsageDataProviders', >+ value => { >+ service_url => $service_url, api_key => $api_key, requestor_id => $requestor_id, >+ customer_id => $customer_id, name => $name, service_platform => $test_platform >+ } >+ } >+ ); >+ >+ $usage_data_provider_with_platform->{report_type} = 'TR_J1'; >+ $usage_data_provider_with_platform->{begin_date} = '2023-08-01'; >+ $usage_data_provider_with_platform->{end_date} = '2023-09-30'; >+ >+ is( >+ $usage_data_provider_with_platform->_build_url_query, >+ $service_url >+ . '/reports/' >+ . lc( $usage_data_provider->{report_type} ) >+ . '?customer_id=' >+ . $customer_id >+ . '&requestor_id=' >+ . $requestor_id >+ . '&api_key=' >+ . $api_key >+ . '&begin_date=' >+ . substr( $usage_data_provider->{begin_date}, 0, 7 ) >+ . '&end_date=' >+ . substr( $usage_data_provider->{end_date}, 0, 7 ) >+ . '&platform=' >+ . $test_platform >+ ); >+ > $schema->storage->txn_rollback; > > }; >-- >2.39.2
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 37856
:
171680
|
171681
|
171682
|
171683
|
171773
|
171774
|
171775
|
171893
|
171894
|
171895
|
171896
|
171897
|
171898
|
171899
|
172040
|
172042
|
172043
|
172044
|
172045
|
172046
|
172047
|
172048
|
172155
| 172156 |
172215