File: parse_props.t

package info (click to toggle)
libnet-trac-perl 0.16-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 316 kB
  • sloc: perl: 2,855; makefile: 2
file content (18 lines) | stat: -rw-r--r-- 579 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use Test::More tests => 3;

my $props = <<'EOF';

<strong>owner</strong> changed from <em>somebody</em> to <em>jrv</em>.</li>
    <li><strong>status</strong> changed from <em>new</em> to <em>assigned</em>.</li>
    <li><strong>type</strong> changed from <em>defect</em> to <em>enhancement</em>.</li>

EOF

use_ok('Net::Trac::TicketHistoryEntry');

my $e = Net::Trac::TicketHistoryEntry->new();
my $prop_data = $e->_parse_props($props);
is(scalar keys %$prop_data, 3, "Four properties");
my @keys = sort (qw(owner status type));
is_deeply([sort keys %$prop_data], [sort @keys]);