blob: 42a1aa7b88103e49806d6e01553fa95daae57b3c [file] [log] [blame]
use Mojo::Base -strict;
use Test::Mojo;
use Test::More;
use Mojo::File qw/path/;
#####################
# Start Fake server #
#####################
my $mount_point = '/api/';
$ENV{KALAMAR_API} = $mount_point;
my $t = Test::Mojo->new('Kalamar');
# Mount fake backend
# Get the fixture path
my $fixtures_path = path(Mojo::File->new(__FILE__)->dirname, 'fixtures');
my $fake_backend = $t->app->plugin(
Mount => {
$mount_point =>
$fixtures_path->child('fake_backend.pl')
}
);
# Configure fake backend
$fake_backend->pattern->defaults->{app}->log($t->app->log);
# Query passed
$t->get_ok('/corpus2/WPD15/232/39681/p2133-2134?spans=false&foundry=*')
->status_is(200)
->json_is('/textSigle', 'WPD15/232/39681')
;
done_testing;