Add matchinfo to rewritten backend
Change-Id: I3a14dbb23da5071751a31d50881f7084e0a24d22
diff --git a/t/fixtures/fake_backend.pl b/t/fixtures/fake_backend.pl
index e7fc518..9573f3f 100644
--- a/t/fixtures/fake_backend.pl
+++ b/t/fixtures/fake_backend.pl
@@ -105,6 +105,23 @@
};
+# Matchinfo fixtures
+get '/corpus/:corpusId/:docId/:textId/:matchId/matchInfo' => sub {
+ my $c = shift;
+
+ my $file = join('_', (
+ 'matchinfo',
+ $c->stash('corpusId'),
+ $c->stash('docId'),
+ $c->stash('textId'),
+ $c->stash('matchId')
+ ));
+
+ # Get response based on query parameter
+ my $response = $c->load_response(slugify($file));
+ return $c->render(%$response);
+};
+
############
# Auth API #