aboutsummaryrefslogtreecommitdiffstats
path: root/t/map
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2011-07-28 19:49:57 +0100
committerStruan Donald <struan@exo.org.uk>2011-07-28 19:49:57 +0100
commit390f8e8ad1e10f832c4323c39bed2c883744a03f (patch)
tree78d03a3cebe1da43cd1b3051913b1e06e6802b26 /t/map
parentb2f1646d91c334bbb082db758a75a0fbc120b25d (diff)
update test for changed maps and fix state checking
Diffstat (limited to 't/map')
-rw-r--r--t/map/tilma/original.t18
1 files changed, 9 insertions, 9 deletions
diff --git a/t/map/tilma/original.t b/t/map/tilma/original.t
index b953a32b2..3add7719e 100644
--- a/t/map/tilma/original.t
+++ b/t/map/tilma/original.t
@@ -14,7 +14,7 @@ my $mech = FixMyStreet::TestMech->new;
mySociety::Locale::gettext_domain('FixMyStreet');
FixMyStreet::Map::set_map_class();
-my $r = Catalyst::Request->new( { base => URI->new('/'), uri => URI->new('http://fixmystreet.com/test') } );
+my $r = Catalyst::Request->new( { base => URI->new('/'), uri => URI->new('http://fixmystreet.com/test'), parameters => { bbox => '-7.6,49.7,-7.5,49.8' } } );
my $c = FixMyStreet::App->new( {
request => $r,
@@ -56,31 +56,31 @@ my $report = FixMyStreet::App->model('DB::Problem')->find_or_create(
for my $test (
{
state => 'fixed',
- colour => 'G',
+ colour => 'green',
},
{
state => 'fixed - user',
- colour => 'G',
+ colour => 'green',
},
{
state => 'fixed - council',
- colour => 'G',
+ colour => 'green',
},
{
state => 'confirmed',
- colour => 'R',
+ colour => 'red',
},
{
state => 'investigating',
- colour => 'R',
+ colour => 'red',
},
{
state => 'planned',
- colour => 'R',
+ colour => 'red',
},
{
state => 'in progress',
- colour => 'R',
+ colour => 'red',
},
) {
subtest "pin colour for state $test->{state}" => sub {
@@ -98,7 +98,7 @@ for my $test (
my $id = $report->id;
my $colour = $test->{colour};
- like $pins, qr#<a [^>]* /report/$id [^>]*>[^>]*/i/pin$colour#x, 'pin colour';
+ is $pins->[0][2], $colour, 'pin colour';
};
}