From 2c718e4337974f87df312a5c65848990dd572f2e Mon Sep 17 00:00:00 2001 From: Tom Bloor Date: Wed, 6 Sep 2017 16:13:00 +0100 Subject: [PATCH] Fix layout issue in upload test and change to using pure json --- t/api/upload.t | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/t/api/upload.t b/t/api/upload.t index fb64136..74b3409 100644 --- a/t/api/upload.t +++ b/t/api/upload.t @@ -201,12 +201,11 @@ $json = { organisation_id => 1, session_key => $session_key, }; -$upload = {json => Mojo::JSON::encode_json($json)}; -$t->post_ok('/api/upload' => form => $upload ) -->status_is(200) -->or($framework->dump_error) -->json_is('/success', Mojo::JSON->true) -->json_like('/message', qr/Upload Successful/); +$t->post_ok('/api/upload' => json => $json ) + ->status_is(200) + ->or($framework->dump_error) + ->json_is('/success', Mojo::JSON->true) + ->json_like('/message', qr/Upload Successful/); is $schema->resultset('Transaction')->count, 1, "1 transaction"; print "test 13 - organisation_id missing (type 1: already validated)\n";