aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/model/rabx_column.t
blob: 9232a92f048affc9af4e228d1444c942b5cd2370 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use FixMyStreet::Test;

use_ok "FixMyStreet::DB::RABXColumn";

# Test that the class names are correctly normalised
my @tests = (
    ["FixMyStreet::DB::Result::Token",     "Token"],
    ["FixMyStreet::App::Model::DB::Token", "Token"],
);

foreach my $test (@tests) {
    my ($input, $expected) = @$test;
    is(
        FixMyStreet::DB::RABXColumn::_get_class_identifier($input),
        $expected,
        "$input -> $expected"
    );
}

done_testing();