Created
July 1, 2015 19:06
-
-
Save JDorpinghaus/2c47ea7b63a8b6e668d6 to your computer and use it in GitHub Desktop.
Mojolicious jason_has slash example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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