Bugzilla – Attachment 82405 Details for
Bug 21835
Request ID is displayed as NaN
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21835: (QA follow-up) Fix failing test
Bug-21835-QA-follow-up-Fix-failing-test.patch (text/plain), 2.12 KB, created by
Martin Renvoize (ashimema)
on 2018-11-16 15:12:24 UTC
(
hide
)
Description:
Bug 21835: (QA follow-up) Fix failing test
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2018-11-16 15:12:24 UTC
Size:
2.12 KB
patch
obsolete
>From 5afb21a28ec7b38fdfc401445e4076511268eb53 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 16 Nov 2018 15:10:05 +0000 >Subject: [PATCH] Bug 21835: (QA follow-up) Fix failing test > >The illrequest api response should always be augmented with an id_prefix >field which is not part of the core illrequest object >--- > t/db_dependent/api/v1/illrequests.t | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/api/v1/illrequests.t b/t/db_dependent/api/v1/illrequests.t >index 44fcd9a292..fb3eff9bdc 100644 >--- a/t/db_dependent/api/v1/illrequests.t >+++ b/t/db_dependent/api/v1/illrequests.t >@@ -94,11 +94,15 @@ subtest 'list() tests' => sub { > } > ); > >+ # The api response is always augmented with the id_prefix >+ my $response = $illrequest->unblessed; >+ $response->{id_prefix} = $illrequest->id_prefix; >+ > # One illrequest created, should get returned > $tx = $t->ua->build_tx( GET => '/api/v1/illrequests' ); > $tx->req->cookies( { name => 'CGISESSID', value => $session_id } ); > $tx->req->env( { REMOTE_ADDR => $remote_address } ); >- $t->request_ok($tx)->status_is(200)->json_is( [ $illrequest->unblessed ] ); >+ $t->request_ok($tx)->status_is(200)->json_is( [$response] ); > > # One illrequest created, returned with augmented data > $tx = $t->ua->build_tx( GET => >@@ -123,12 +127,16 @@ subtest 'list() tests' => sub { > } > ); > >+ # The api response is always augmented with the id_prefix >+ my $response2 = $illrequest2->unblessed; >+ $response2->{id_prefix} = $illrequest2->id_prefix; >+ > # Two illrequest created, should get returned > $tx = $t->ua->build_tx( GET => '/api/v1/illrequests' ); > $tx->req->cookies( { name => 'CGISESSID', value => $session_id } ); > $tx->req->env( { REMOTE_ADDR => $remote_address } ); > $t->request_ok($tx)->status_is(200) >- ->json_is( [ $illrequest->unblessed, $illrequest2->unblessed ] ); >+ ->json_is( [ $response, $response2 ] ); > > # Warn on unsupported query parameter > $tx = $t->ua->build_tx( GET => '/api/v1/illrequests?request_blah=blah' ); >-- >2.19.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 21835
:
82342
|
82343
|
82381
| 82405