003_status_route.t 459 B

1234567891011121314151617
  1. use strict;
  2. use warnings;
  3. use Data::Dumper;
  4. use Bartender;
  5. use Test::More tests => 2;
  6. use Plack::Test;
  7. use HTTP::Request::Common;
  8. use JSON ();
  9. my $app = Bartender->to_app;
  10. my $test = Plack::Test->create($app);
  11. my $res = $test->request( GET '/status?dossier=foo&projetId=bar' );
  12. ok( $res->is_success, '[GET /status] successful' );
  13. my $compilation = JSON::decode_json( $res->content );
  14. is( $compilation->{status}, 'NONE', '[GET /status NONE] successful' );