aboutsummaryrefslogtreecommitdiffstats
path: root/t/Mock
diff options
context:
space:
mode:
Diffstat (limited to 't/Mock')
-rw-r--r--t/Mock/MapIt.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/t/Mock/MapIt.pm b/t/Mock/MapIt.pm
index 926d94b1e..6e3c5d673 100644
--- a/t/Mock/MapIt.pm
+++ b/t/Mock/MapIt.pm
@@ -92,8 +92,14 @@ sub dispatch_request {
sub (GET + /area/*) {
my ($self, $area) = @_;
- my $response = { "id" => $area, "name" => "Area $area", "type" => "UTA" };
- return $self->output($response);
+ my $response;
+ if ($area eq '999') {
+ $response = { code => 404, error => "No Area matches the given query." };
+ return [ 404, [ 'Content-Type' => 'application/json' ], [ $self->json->encode($response) ] ];
+ } else {
+ $response = { "id" => $area, "name" => "Area $area", "type" => "UTA" };
+ return $self->output($response);
+ }
},
sub (GET + /area/*/children) {