Skip to content

Instantly share code, notes, and snippets.

@JDorpinghaus
Created July 1, 2015 19:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JDorpinghaus/2c47ea7b63a8b6e668d6 to your computer and use it in GitHub Desktop.
Save JDorpinghaus/2c47ea7b63a8b6e668d6 to your computer and use it in GitHub Desktop.
Mojolicious jason_has slash example
use Mojo::Base;
use FindBin;
BEGIN { unshift @INC, "$FindBin::Bin/../../lib" }
use Test::More;
use Test::Mojo;
my $t = Test::Mojo->new('Ama');
$t->get_ok('/questions')->status_is(200);
$t->post_ok('/questions' => {Accept => 'application/json'})
->status_is(200)
->json_has('/question_id');
$t->post_ok('/questions' => {Accept => 'application/json'})
->status_is(200)
->json_has('question_id');
done_testing();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment