aboutsummaryrefslogtreecommitdiffstats
path: root/t/Mock/Bing.pm
diff options
context:
space:
mode:
Diffstat (limited to 't/Mock/Bing.pm')
-rw-r--r--t/Mock/Bing.pm17
1 files changed, 17 insertions, 0 deletions
diff --git a/t/Mock/Bing.pm b/t/Mock/Bing.pm
index 77045950f..cc4dab845 100644
--- a/t/Mock/Bing.pm
+++ b/t/Mock/Bing.pm
@@ -19,6 +19,7 @@ sub dispatch_request {
my $results = [ {
point => { coordinates => [ 51, -1 ] },
name => 'Constitution Hill, London, SW1A',
+ confidence => 'High',
address => {
addressLine => 'Constitution Hill',
locality => 'London',
@@ -29,6 +30,7 @@ sub dispatch_request {
push @$results, {
point => { coordinates => [ 51, -1 ] },
name => 'Constitution Hill again, United Kingdom',
+ confidence => 'High',
address => {
addressLine => 'Constitution Hill again',
locality => 'London',
@@ -36,6 +38,21 @@ sub dispatch_request {
}
};
}
+ if ($query->{q} =~ /low/) {
+ push @$results, {
+ point => { coordinates => [ 52, -2 ] },
+ name => 'Constitution Hill elsewhere, United Kingdom',
+ confidence => 'Low',
+ address => {
+ addressLine => 'Constitution Hill elsewhere',
+ locality => 'London',
+ countryRegion => 'United Kingdom',
+ }
+ };
+ }
+ if ($query->{q} =~ /onlylow/) {
+ @$results = map { $_->{confidence} = 'Low'; $_ } @$results;
+ }
my $data = {
statusCode => 200,
resourceSets => [ { resources => $results } ],