Bugzilla – Attachment 168613 Details for
Bug 37262
api/v1/extended_attribute_types does not filter additional fields for unmapped tablenames
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37262: Tests for filtering unmapped tablename
Bug-37262-Tests-for-filtering-unmapped-tablename.patch (text/plain), 1.77 KB, created by
David Nind
on 2024-07-08 18:39:42 UTC
(
hide
)
Description:
Bug 37262: Tests for filtering unmapped tablename
Filename:
MIME Type:
Creator:
David Nind
Created:
2024-07-08 18:39:42 UTC
Size:
1.77 KB
patch
obsolete
>From df3b4d5cbfeb444ab260c47d22f4979b7876bcd8 Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@ptfs-europe.com> >Date: Fri, 5 Jul 2024 12:10:00 +0000 >Subject: [PATCH] Bug 37262: Tests for filtering unmapped tablename > >Test plan: >1) Apply this patch only, run tests: >prove t/db_dependent/api/v1/extended_attribute_types.t >2) Notice they fail >3) Apply the fix patch, refresh the API bundle, run: >yarn api:bundle >4) Run tests again, notice they pass > >Signed-off-by: David Nind <david@davidnind.com> >--- > t/db_dependent/api/v1/extended_attribute_types.t | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/api/v1/extended_attribute_types.t b/t/db_dependent/api/v1/extended_attribute_types.t >index 2b1ccf4208..9821ef345b 100755 >--- a/t/db_dependent/api/v1/extended_attribute_types.t >+++ b/t/db_dependent/api/v1/extended_attribute_types.t >@@ -34,7 +34,7 @@ t::lib::Mocks::mock_preference( 'RESTBasicAuth', 1 ); > > subtest 'list() tests' => sub { > >- plan tests => 20; >+ plan tests => 23; > > $schema->storage->txn_begin; > >@@ -120,6 +120,10 @@ subtest 'list() tests' => sub { > $t->get_ok("//$userid:$password@/api/v1/extended_attribute_types?resource_type=invoice")->status_is(200) > ->json_is( [ $additional_field->to_api, $another_additional_field->to_api ] ); > >+ # Filtering works for unmapped tablename >+ $t->get_ok("//$userid:$password@/api/v1/extended_attribute_types?resource_type=subscription")->status_is(200) >+ ->json_is( [ $additional_field_yet_another_different_tablename->to_api ] ); >+ > # Warn on unsupported query parameter > $t->get_ok("//$userid:$password@/api/v1/extended_attribute_types?blah=blah")->status_is(400) > ->json_is( [ { path => '/query/blah', message => 'Malformed query string' } ] ); >-- >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 37262
:
168533
|
168534
|
168589
|
168590
|
168613
|
168614
|
168742
|
168743
|
168744
|
168752