-
Notifications
You must be signed in to change notification settings - Fork 110
/
mt-portal-site.t
49 lines (45 loc) · 1.32 KB
/
mt-portal-site.t
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/perl
use strict;
use warnings;
use FindBin;
use lib "$FindBin::Bin/lib"; # t/lib
use Test::More;
use MT::Test::Env;
our $test_env;
BEGIN {
$test_env = MT::Test::Env->new(
DefaultLanguage => 'ja',
);
$ENV{MT_CONFIG} = $test_env->config_file;
}
use MT;
MT->instance;
my @test_suite = ({
product_name => 'Movable Type',
product_code => 'MT',
portal_url => 'https://www.sixapart.jp/movabletype/',
},
{
product_name => 'Movable Type Advanced',
product_code => 'MT',
portal_url => 'https://www.sixapart.jp/movabletype/solutions/mta.html',
},
{
product_name => 'Movable Type',
product_code => 'MTP',
portal_url => 'https://www.sixapart.jp/movabletype/solutions/mtpremium.html',
},
{
product_name => 'Movable Type Advanced',
product_code => 'MTP',
portal_url => 'https://www.sixapart.jp/movabletype/solutions/mtpremium.html',
},
);
for my $test (@test_suite) {
subtest '$PRODUCT_NAME: ' . $test->{product_name} . ', $PRODUCT_CODE: ' . $test->{product_code} => sub {
$MT::PRODUCT_NAME = $test->{product_name};
$MT::PRODUCT_CODE = $test->{product_code};
is(MT->portal_url, $test->{portal_url}, 'MT->portal_url: ' . $test->{portal_url});
};
}
done_testing;