Bugzilla – Attachment 177111 Details for
Bug 38932
Adding debits and credits should return the correct Location header
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38932: Regression tests
Bug-38932-Regression-tests.patch (text/plain), 2.27 KB, created by
Matt Blenkinsop
on 2025-01-24 12:22:04 UTC
(
hide
)
Description:
Bug 38932: Regression tests
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2025-01-24 12:22:04 UTC
Size:
2.27 KB
patch
obsolete
>From 27a1ed22a804dccd498d207623bae91fe905e4ac Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 20 Jan 2025 17:01:50 -0300 >Subject: [PATCH] Bug 38932: Regression tests > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >--- > t/db_dependent/api/v1/patrons_accounts.t | 21 +++++++++++++++------ > 1 file changed, 15 insertions(+), 6 deletions(-) > >diff --git a/t/db_dependent/api/v1/patrons_accounts.t b/t/db_dependent/api/v1/patrons_accounts.t >index df99f522d25..db2583bb7df 100755 >--- a/t/db_dependent/api/v1/patrons_accounts.t >+++ b/t/db_dependent/api/v1/patrons_accounts.t >@@ -184,7 +184,7 @@ subtest 'get_balance() tests' => sub { > > subtest 'add_credit() tests' => sub { > >- plan tests => 18; >+ plan tests => 19; > > $schema->storage->txn_begin; > >@@ -209,9 +209,13 @@ subtest 'add_credit() tests' => sub { > > my $credit = { amount => 100 }; > >- my $ret = $t->post_ok( >- "//$userid:$password@/api/v1/patrons/$patron_id/account/credits" => >- json => $credit )->status_is(201)->tx->res->json; >+ my $ret = >+ $t->post_ok( "//$userid:$password@/api/v1/patrons/$patron_id/account/credits" => json => $credit ) >+ ->status_is(201) >+ ->header_is( >+ 'Location' => "/api/v1/patrons/$patron_id/account/credits/" . $t->tx->res->json->{account_line_id}, >+ "REST3.4.1" >+ )->tx->res->json; > > is_deeply( > $ret, >@@ -472,7 +476,7 @@ subtest 'list_debits() test' => sub { > > subtest 'add_debit() tests' => sub { > >- plan tests => 20; >+ plan tests => 21; > > $schema->storage->txn_begin; > >@@ -546,7 +550,12 @@ subtest 'add_debit() tests' => sub { > > my $account_line_id = $ret->{account_line_id}; > >- $t->post_ok( "//$userid:$password@/api/v1/patrons/$patron_id/account/debits" => json => $debit )->status_is(201); >+ $t->post_ok( "//$userid:$password@/api/v1/patrons/$patron_id/account/debits" => json => $debit ) >+ ->status_is(201) >+ ->header_is( >+ 'Location' => "/api/v1/patrons/$patron_id/account/debits/" . $t->tx->res->json->{account_line_id}, >+ "REST3.4.1" >+ ); > > is( > $account->outstanding_debits->total_outstanding, >-- >2.48.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 38932
:
176842
|
176843
|
176896
|
176897
| 177111 |
177112