Bugzilla – Attachment 94720 Details for
Bug 23896
logaction should pass the correct interface to Koha::Logger
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23896: Add unit tests
Bug-23896-Add-unit-tests.patch (text/plain), 1.50 KB, created by
Marcel de Rooy
on 2019-10-25 09:05:29 UTC
(
hide
)
Description:
Bug 23896: Add unit tests
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2019-10-25 09:05:29 UTC
Size:
1.50 KB
patch
obsolete
>From 75ad4cf499ef7d1cf081cb1e18d28c8ccb632e60 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 25 Oct 2019 09:04:25 +0000 >Subject: [PATCH] Bug 23896: Add unit tests >Content-Type: text/plain; charset=utf-8 > >Test plan: >Run t/db_dependent/Log.t > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > t/db_dependent/Log.t | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/Log.t b/t/db_dependent/Log.t >index f84fb14265..d3bb83750d 100644 >--- a/t/db_dependent/Log.t >+++ b/t/db_dependent/Log.t >@@ -17,7 +17,7 @@ > # with Koha; if not, see <http://www.gnu.org/licenses>. > > use Modern::Perl; >-use Test::More tests => 5; >+use Test::More tests => 6; > > use C4::Context; > use C4::Log; >@@ -163,6 +163,18 @@ subtest 'GetLogs() respects interface filters' => sub { > is( @{$logs}[0]->{ interface }, 'commandline', 'Interface correctly filtered (commandline)'); > }; > >+subtest 'Check interface for logaction' => sub { >+ plan tests => 2; >+ >+ C4::Context->interface('opac'); >+ logaction( 'NEWMODULE', 'ACTIONX', 0, '', 'my_interface'); >+ logaction( 'NEWMODULE', 'ACTIONX', 0, '' ); # default interface >+ my $logs = GetLogs( undef, undef, undef, ['NEWMODULE'], undef, undef, undef, [ 'my_interface' ] ); >+ is( @$logs, 1, 'Found my_interface' ); >+ $logs = GetLogs( undef, undef, undef, ['NEWMODULE'], undef, undef, undef, [ 'opac' ] ); >+ is( @$logs, 1, 'Found opac' ); >+}; >+ > subtest 'GDPR logging' => sub { > plan tests => 1; > >-- >2.11.0
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 23896
:
94719
|
94720
|
94721
|
98080
|
98085