Line 0
Link Here
|
0 |
- |
1 |
#!/usr/bin/perl |
|
|
2 |
|
3 |
# This file is part of Koha. |
4 |
# |
5 |
# Koha is free software; you can redistribute it and/or modify it |
6 |
# under the terms of the GNU General Public License as published by |
7 |
# the Free Software Foundation; either version 3 of the License, or |
8 |
# (at your option) any later version. |
9 |
# |
10 |
# Koha is distributed in the hope that it will be useful, but |
11 |
# WITHOUT ANY WARRANTY; without even the implied warranty of |
12 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 |
# GNU General Public License for more details. |
14 |
# |
15 |
# You should have received a copy of the GNU General Public License |
16 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
17 |
|
18 |
use Modern::Perl; |
19 |
|
20 |
use Test::NoWarnings; |
21 |
use Test::More tests => 2; |
22 |
|
23 |
use Koha::Manual; |
24 |
|
25 |
subtest 'VueJS components' => sub { |
26 |
|
27 |
my $tests = { |
28 |
q{http://localhost:8081/cgi-bin/koha/erm/agreements} => |
29 |
q{https://koha-community.org/manual/25.05/en/html/erm.html#agreements}, |
30 |
q{/koha/erm/agreements} => q{https://koha-community.org/manual/25.05/en/html/erm.html#agreements}, |
31 |
q{/koha/erm/agreements/add} => |
32 |
q{https://koha-community.org/manual/25.05/en/html/erm.html#create-an-agreement-record}, |
33 |
q{/koha/erm/agreements/edit/1} => |
34 |
q{https://koha-community.org/manual/25.05/en/html/erm.html#create-an-agreement-record}, |
35 |
q{/koha/erm/agreements?by_expired=true&max_expiration_date=2025-06-24} => |
36 |
q{https://koha-community.org/manual/25.05/en/html/erm.html#agreements}, |
37 |
}; |
38 |
|
39 |
plan tests => scalar keys %$tests; |
40 |
|
41 |
my $language = 'en'; |
42 |
while ( my ( $refer, $expected ) = each(%$tests) ) { |
43 |
is( |
44 |
Koha::Manual::get_url( $refer, $language ), $expected, |
45 |
sprintf( "%s should link to %s", $refer, $expected ) |
46 |
); |
47 |
} |
48 |
}; |