aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/model/rabx_column.t
blob: 607d578ceb68955e28c04060c82a3ac3becaf1ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use strict;
use warnings;

use Test::More;

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();