Bugzilla – Attachment 128169 Details for
Bug 29484
ListSets doesn't return noSetHierarchy when appropriate
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29484: Regression tests
Bug-29484-Regression-tests.patch (text/plain), 1.98 KB, created by
Jonathan Druart
on 2021-12-02 14:24:08 UTC
(
hide
)
Description:
Bug 29484: Regression tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-12-02 14:24:08 UTC
Size:
1.98 KB
patch
obsolete
>From 9dea8fbd249c31ac91447da45931e2b11fed1feb Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 15 Nov 2021 09:51:53 -0300 >Subject: [PATCH] Bug 29484: Regression tests > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > t/db_dependent/OAI/Server.t | 42 ++++++++++++++++++++++++++++++++++++- > 1 file changed, 41 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/OAI/Server.t b/t/db_dependent/OAI/Server.t >index 4888c625c2e..c9ae0ec9947 100755 >--- a/t/db_dependent/OAI/Server.t >+++ b/t/db_dependent/OAI/Server.t >@@ -21,7 +21,7 @@ use Modern::Perl; > use Test::Deep qw( cmp_deeply re ); > use Test::MockTime qw/set_fixed_time set_relative_time restore_time/; > >-use Test::More tests => 33; >+use Test::More tests => 34; > use DateTime; > use File::Basename; > use File::Spec; >@@ -865,3 +865,43 @@ subtest 'Tests for timestamp handling' => sub { > > $schema->storage->txn_rollback; > }; >+ >+subtest 'ListSets() tests' => sub { >+ >+ plan tests => 2; >+ >+ $schema->storage->txn_begin; >+ >+ # initial cleanup >+ $schema->resultset('OaiSet')->delete; >+ >+ test_query( >+ 'ListSets - no sets should return a noSetHierarchy exception', >+ { verb => 'ListSets' }, >+ { >+ error => { >+ code => 'noSetHierarchy', >+ content => 'There are no OAI sets defined', >+ } >+ } >+ ); >+ >+ # Add a couple sets >+ AddOAISet({ spec => 'set_1', name => 'Set 1' }); >+ AddOAISet({ spec => 'set_2', name => 'Set 2' }); >+ >+ test_query( >+ 'ListSets - no sets should return a noSetHierarchy exception', >+ { verb => 'ListSets' }, >+ { >+ ListSets => { >+ set => [ >+ { setSpec => 'set_1', setName => 'Set 1' }, >+ { setSpec => 'set_2', setName => 'Set 2' }, >+ ] >+ } >+ } >+ ); >+ >+ $schema->storage->txn_rollback; >+}; >-- >2.25.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 29484
:
127637
|
127638
|
127995
|
127996
| 128169 |
128170