]> git.donarmstrong.com Git - debbugs.git/blob - t/16_usertags.t
call iso8601 instead of stringify
[debbugs.git] / t / 16_usertags.t
1 # -*- mode: cperl;-*-
2
3 use Test::More;
4
5 use warnings;
6 use strict;
7
8 plan tests => 4;
9
10 use_ok('Debbugs::CGI::Pkgreport');
11
12 my @usertags = ('severity=serious,severity=grave,severity=critical',
13                 'tag=second',
14                 'tag=third',
15                 '',
16                );
17
18 my @bugs =
19     ({severity => 'normal',
20       tags => 'wrongtag',
21       order => 3,
22      },
23     {severity => 'critical',
24      tags => 'second',
25      order => 0,
26     },
27     {severity => 'normal',
28      tags => 'third',
29      order => 2,
30     },
31     );
32
33 for my $bug (@bugs) {
34     my $order = Debbugs::CGI::Pkgreport::get_bug_order_index(\@usertags,$bug);
35     ok($order == $bug->{order},
36        "order $bug->{order} == $order",
37       );
38 }
39
40