Introduce mock service
Change-Id: Ide981afc41020adbf1d1ee671bd397d40c9fdde8
diff --git a/lib/Kalamar.pm b/lib/Kalamar.pm
index 3f1e3bf..92937d4 100644
--- a/lib/Kalamar.pm
+++ b/lib/Kalamar.pm
@@ -97,6 +97,14 @@
# Configure mail exception
$self->plugin('MailException' => $self->config('MailException'));
+ # Start fixture
+ if ($self->mode eq 'test') {
+ $self->plugin(Mount => {
+ 'http://*:3001/api/v0.1/' => $self->home->child('lib/Kalamar/Apps/test_backend.pl')
+ });
+ $self->config('Kalamar')->{api} = 'http://*:3001/api/v0.1/';
+ };
+
# Configure documentation navigation
my $navi = Mojo::File->new($self->home->child('templates','doc','navigation.json'))->slurp;