View | Details | Raw Unified | Return to bug 30242
Collapse All | Expand All

(-)a/t/db_dependent/Koha/REST/V1.t (-3 / +22 lines)
Lines 17-25 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 1;
20
use Test::More tests => 2;
21
use Test::Mojo;
21
use Test::Mojo;
22
use Test::Warn;
22
#use Test::Warn;
23
24
use t::lib::Mocks;
23
25
24
subtest 'Type definition tests' => sub {
26
subtest 'Type definition tests' => sub {
25
27
Lines 40-42 subtest 'Type definition tests' => sub { Link Here
40
    is( $types->type('mij'),  'application/marc-in-json', 'application/marc-in-json is defined' );
42
    is( $types->type('mij'),  'application/marc-in-json', 'application/marc-in-json is defined' );
41
    is( $types->type('marc'), 'application/marc',         'application/marc is defined' );
43
    is( $types->type('marc'), 'application/marc',         'application/marc is defined' );
42
};
44
};
43
- 
45
46
subtest 'check log_level' => sub {
47
    plan tests => 3;
48
    my $test;
49
50
    t::lib::Mocks::mock_config( 'mojo_log_level', 'warn' );
51
    $test = Test::Mojo->new('Koha::REST::V1');
52
    is( $test->app->log->level, 'warn', 'Log level comes from koha-conf.xml');
53
54
    t::lib::Mocks::mock_config( 'mojo_log_level', undef );
55
    t::lib::Mocks::mock_config( 'dev_install', 1 );
56
    $test = Test::Mojo->new('Koha::REST::V1');
57
    is( $test->app->log->level, 'trace', 'Log level falls back to trace for dev_install');
58
59
    t::lib::Mocks::mock_config( 'dev_install', undef );
60
    $test = Test::Mojo->new('Koha::REST::V1');
61
    is( $test->app->log->level, 'info', 'Log level falls back to info otherwise');
62
};

Return to bug 30242