ofs | hex dump | ascii |
---|
0000 | b8 fe 4c cd 21 fc e8 00 00 00 00 5b 81 c3 09 e6 00 00 8d b3 e4 06 00 00 8d 93 ec 19 ff ff ad 21 | ..L.!......[...................! |
0020 | c0 74 05 01 14 10 eb f6 8d b3 00 00 00 00 8d bb 90 00 00 00 01 16 83 c6 04 39 fe 72 f7 31 c0 8d | .t.......................9.r.1.. |
0040 | bb e4 06 00 00 8d 8b 8b 27 08 00 29 f9 c1 e9 02 f3 ab 8d 74 24 04 8d bb 2c 1e 00 00 b9 09 00 00 | ........'..).......t$...,....... |
0060 | 00 89 67 fc 3b 0e 76 02 8b 0e 41 f3 a5 8b 93 30 1e 00 00 52 89 e0 e8 15 bc 00 00 50 8d b3 ec ff | ..g.;.v...A....0...R.......P.... |
0080 | ff ff 8d bb 00 00 00 00 39 fe 73 07 ff 16 83 c6 04 eb f5 58 5a e8 b5 1e 00 00 ff 93 10 06 00 00 | ........9.s........XZ........... |
00a0 | f4 00 00 00 31 c0 c3 c3 c3 53 e8 00 00 00 00 5b 81 c3 65 e5 00 00 e8 5d 52 00 00 5b c3 90 90 90 | ....1....S.....[..e....]R..[.... |
00c0 | 56 53 e8 00 00 00 00 5b 81 c3 4d e5 00 00 8d b3 5c f2 ff ff 2d 00 01 00 00 83 f8 0b 77 27 8b 0c | VS.....[..M.....\...-.......w'.. |
00e0 | 86 83 f9 ff 74 1f 8b 93 e8 16 00 00 81 c1 92 00 00 00 8b 44 ca 04 85 c0 74 0b 8b 54 ca 08 e8 bd | ....t..............D....t..T.... |
0100 | 4b 00 00 eb cf 5b 5e c3 55 57 56 53 81 ec 3c 01 00 00 e8 00 00 00 00 5b 81 c3 fd e4 00 00 89 44 | K....[^.UWVS..<........[.......D |
0120 | 24 0c 89 54 24 1c 89 ce 8d 6c 24 24 31 d2 89 6c 24 10 8d 84 24 24 01 00 00 89 44 24 14 8b 4c 24 | $..T$....l$$1..l$...$$....D$..L$ |
0140 | 0c 49 89 4c 24 18 8d 83 1c f0 ff ff 89 44 24 20 e9 19 01 00 00 46 3c 23 75 24 ff 74 24 0c ff 74 | .I.L$........D$......F<#u$.t$..t |
0160 | 24 24 55 e8 00 ac 00 00 01 c5 8b 54 24 10 8d 44 02 f8 89 44 24 10 83 c4 0c e9 fe 00 00 00 3c 7b | $$U........T$..D...D$.........<{ |
0180 | 0f 85 ee 00 00 00 b9 06 00 00 00 31 c0 8b 7c 24 14 f3 ab 89 b4 24 24 01 00 00 8b 54 24 04 eb 1d | ...........1..|$.....$$....T$... |
01a0 | 83 f8 01 7f 17 80 f9 2c 75 12 89 b4 c4 28 01 00 00 40 8d 4e 01 89 8c c4 24 01 00 00 46 8a 0e 80 | .......,u....(...@.N....$...F... |
01c0 | f9 7d 74 04 84 c9 75 d8 89 54 24 04 89 b4 c4 28 01 00 00 80 3e 01 83 de ff 83 bc 24 2c 01 00 00 | .}t...u..T$....(....>......$,... |
01e0 | 00 75 1c 8b 84 24 24 01 00 00 8b 94 24 28 01 00 00 89 84 24 2c 01 00 00 89 94 24 30 01 00 00 83 | .u...$$.....$(.....$,.....$0.... |
0200 | bc 24 34 01 00 00 00 75 1c 8b 94 24 2c 01 00 00 8b 8c 24 30 01 00 00 89 94 24 34 01 00 00 89 8c | .$4....u...$,.....$0.....$4..... |
0220 | 24 38 01 00 00 b9 02 00 00 00 83 7c 24 18 01 77 0b 8b 44 24 18 8b 8c 83 8c f2 ff ff 8b 84 cc 24 | $8.........|$..w..D$...........$ |
0240 | 01 00 00 89 0c 24 8b 54 24 04 eb 16 89 ef 2b 7c 24 10 81 ff ff 00 00 00 77 07 8a 08 88 4d 00 45 | .....$.T$.....+|$.......w....M.E |
0260 | 42 40 8b 0c 24 3b 84 cc 28 01 00 00 72 de 89 54 24 04 eb 08 88 45 00 45 ff 44 24 04 89 e8 2b 44 | B@..$;..(...r..T$....E.E.D$...+D |
0280 | 24 10 3d ef 00 00 00 77 0a 8a 06 84 c0 0f 85 c2 fe ff ff 8b 54 24 04 c6 45 00 00 8b 8b e4 06 00 | $.=....w............T$..E....... |
02a0 | 00 31 c0 39 ca 7d 07 8d 41 01 29 d0 d1 f8 8b 8b e8 16 00 00 8d b3 4d f1 ff ff 56 50 8d 7c 24 2c | .1.9.}..A.)...........M...VP.|$, |
02c0 | 57 56 50 8b b1 54 04 00 00 8b 89 28 04 00 00 29 d1 d1 f9 8d 4c 0e 01 29 c1 51 ff 74 24 34 8d 83 | WVP..T.....(...)....L..).Q.t$4.. |
02e0 | 27 f0 ff ff 50 89 54 24 28 e8 d2 a8 00 00 8b 54 24 28 89 93 e4 06 00 00 81 c4 5c 01 00 00 5b 5e | '...P.T$(......T$(........\...[^ |
0300 | 5f 5d c3 55 57 56 53 e8 00 00 00 00 5b 81 c3 08 e3 00 00 89 c7 85 c0 8b 83 e8 16 00 00 75 21 8b | _].UWVS.....[................u!. |
0320 | 90 58 04 00 00 03 90 4c 04 00 00 52 8d 83 3c f0 ff ff 50 e8 88 a8 00 00 8d bb 4d f1 ff ff eb 19 | .X.....L...R..<...P.......M..... |
0340 | 8b 90 58 04 00 00 03 90 4c 04 00 00 52 8d 83 47 f0 ff ff 50 e8 67 a8 00 00 5a 59 8b 83 e8 16 00 | ..X.....L...R..G...P.g...ZY..... |
0360 | 00 8b b0 58 04 00 00 03 b0 4c 04 00 00 8d ab 53 f0 ff ff eb 2e 3c 0d 7f 0a 3c 0b 7d 25 3c 0a 75 | ...X.....L.....S.....<...<.}%<.u |
0380 | 14 eb 06 3c 1b 75 0e eb 19 46 56 55 e8 2f a8 00 00 59 58 eb 0d 0f be c0 ba 02 00 00 00 e8 c6 a2 | ...<.u...FVU./...YX............. |
03a0 | pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #888888 } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { color: #008800; font-weight: bold } /* Keyword */
.highlight .ch { color: #888888 } /* Comment.Hashbang */
.highlight .cm { color: #888888 } /* Comment.Multiline */
.highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */
.highlight .cpf { color: #888888 } /* Comment.PreprocFile */
.highlight .c1 { color: #888888 } /* Comment.Single */
.highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #333333 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #666666 } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008800 } /* Keyword.Pseudo */
.highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */
.highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */
.highlight .na { color: #336699 } /* Name.Attribute */
.highlight .nb { color: #003388 } /* Name.Builtin */
.highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */
.highlight .no { color: #003366; font-weight: bold } /* Name.Constant */
.highlight .nd { color: #555555 } /* Name.Decorator */
.highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */
.highlight .nl { color: #336699; font-style: italic } /* Name.Label */
.highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */
.highlight .py { color: #336699; font-weight: bold } /* Name.Property */
.highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #336699 } /* Name.Variable */
.highlight .ow { color: #008800 } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */
.highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */
.highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */
.highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */
.highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */
.highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */
.highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */
.highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */
.highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */
.highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */
.highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */
.highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */
.highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */
.highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */
.highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */
.highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */
.highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */
.highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */
.highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */
.highlight .vc { color: #336699 } /* Name.Variable.Class */
.highlight .vg { color: #dd7700 } /* Name.Variable.Global */
.highlight .vi { color: #3333bb } /* Name.Variable.Instance */
.highlight .vm { color: #336699 } /* Name.Variable.Magic */
.highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */use strict;
use warnings;
use Test::More;
use FixMyStreet::TestMech;
use FixMyStreet::App;
my $mech = FixMyStreet::TestMech->new;
my $dt = DateTime->new(
year => 2011,
month => 10,
day => 10
);
my $user1 = FixMyStreet::App->model('DB::User')
->find_or_create( { email => 'reporter-rss@example.com', name => 'Reporter User' } );
my $dt_parser = FixMyStreet::App->model('DB')->schema->storage->datetime_parser;
my $report = FixMyStreet::App->model('DB::Problem')->find_or_create( {
postcode => 'eh1 1BB',
bodies_str => '2651',
areas => ',11808,135007,14419,134935,2651,20728,',
category => 'Street lighting',
title => 'Testing',
detail => 'Testing Detail',
used_map => 1,
name => $user1->name,
anonymous => 0,
state => 'confirmed',
confirmed => $dt_parser->format_datetime($dt),
lastupdate => $dt_parser->format_datetime($dt),
whensent => $dt_parser->format_datetime($dt->clone->add( minutes => 5 )),
lang => 'en-gb',
service => '',
cobrand => 'default',
cobrand_data => '',
send_questionnaire => 1,
latitude => '55.951963',
longitude => '-3.189944',
user_id => $user1->id,
} );
$mech->host('www.fixmystreet.com');
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ 'fixmystreet' ],
MAPIT_URL => 'http://mapit.mysociety.org/',
}, sub {
$mech->get_ok("/rss/pc/EH11BB/2");
};
$mech->content_contains( "Testing, 10th October" );
$mech->content_lacks( 'Nearest road to the pin' );
$report->geocode(
{
'traceId' => 'ae7c4880b70b423ebc8ab4d80961b3e9|LTSM001158|02.00.71.1600|LTSMSNVM002010, LTSMSNVM001477',
'statusDescription' => 'OK',
'brandLogoUri' => 'http://dev.virtualearth.net/Branding/logo_powered_by.png',
'resourceSets' => [
{
'resources' => [
{
'geocodePoints' => [
{
'calculationMethod' => 'Interpolation',
'coordinates' => [
'55.9532357007265',
'-3.18906001746655'
],
'usageTypes' => [
'Display',
'Route'
],
'type' => 'Point'
}
],
'entityType' => 'Address',
'name' => '18 N Bridge, Edinburgh EH1 1',
'point' => {
'coordinates' => [
'55.9532357007265',
'-3.18906001746655'
],
'type' => 'Point'
},
'bbox' => [
'55.9493729831558',
'-3.19825819222605',
'55.9570984182972',
'-3.17986184270704'
],
'matchCodes' => [
'Good'
],
'address' => {
'countryRegion' => 'United Kingdom',
'adminDistrict2' => 'Edinburgh City',
'adminDistrict' => 'Scotland',
'addressLine' => '18 North Bridge',
'formattedAddress' => '18 N Bridge, Edinburgh EH1 1',
'postalCode' => 'EH1 1',
'locality' => 'Edinburgh'
},
'confidence' => 'Medium',
'__type' => 'Location:http://schemas.microsoft.com/search/local/ws/rest/v1'
}
],
'estimatedTotal' => 1
}
],
'copyright' => "Copyright \x{a9} 2011 Microsoft and its suppliers. All rights reserved. This API cannot be accessed and the content and any results may not be used, reproduced or transmitted in any manner without express written permission from Microsoft Corporation.",
'statusCode' => 200,
'authenticationResultCode' => 'ValidCredentials'
}
);
$report->update();
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ 'fixmystreet' ],
MAPIT_URL => 'http://mapit.mysociety.org/',
}, sub {
$mech->get_ok("/rss/pc/EH11BB/2");
};
$mech->content_contains( "Testing, 10th October" );
$mech->content_contains( '18 North Bridge, Edinburgh' );
$report->delete();
my $council = $mech->create_body_ok(2333, 'Hart Council');
my $county = $mech->create_body_ok(2227, 'Hampshire Council');
my $now = DateTime->now();
my $report_to_council = FixMyStreet::App->model('DB::Problem')->find_or_create(
{
postcode => 'GU51 4AE',
bodies_str => $council->id,
areas => ',2333,2227,',
category => 'Other',
title => 'council report',
detail => 'Test 2 Detail',
used_map => 't',
name => 'Test User',
anonymous => 'f',
state => 'closed',
confirmed => $now->ymd . ' ' . $now->hms,
lang => 'en-gb',
service => '',
cobrand => 'default',
cobrand_data => '',
send_questionnaire => 't',
latitude => '51.279616',
longitude => '-0.846040',
user_id => $user1->id,
}
);
my $report_to_county_council = FixMyStreet::App->model('DB::Problem')->find_or_create(
{
postcode => 'GU51 4AE',
bodies_str => $county->id,
areas => ',2333,2227,',
category => 'Other',
title => 'county report',
detail => 'Test 2 Detail',
used_map => 't',
name => 'Test User',
anonymous => 'f',
state => 'closed',
confirmed => $now->ymd . ' ' . $now->hms,
lang => 'en-gb',
service => '',
cobrand => 'default',
cobrand_data => '',
send_questionnaire => 't',
latitude => '51.279616',
longitude => '-0.846040',
user_id => $user1->id,
}
);
subtest "check RSS feeds on cobrand have correct URLs for non-cobrand reports" => sub {
$mech->host('hart.fixmystreet.com');
my $expected1 = mySociety::Config::get('BASE_URL') . '/report/' . $report_to_county_council->id;
my $expected2;
FixMyStreet::override_config {
ALLOWED_COBRANDS => [ 'hart' ],
MAPIT_URL => 'http://mapit.mysociety.org/',
}, sub {
$mech->get_ok("/rss/area/Hart");
my $cobrand = FixMyStreet::Cobrand->get_class_for_moniker('hart')->new();
$expected2 = $cobrand->base_url . '/report/' . $report_to_council->id;
};
$mech->content_contains($expected1, 'non cobrand area report point to fixmystreet.com');
$mech->content_contains($expected2, 'cobrand area report point to cobrand url');
};
$mech->delete_user( $user1 );
done_testing();
|