<commit_before>use Test::More tests => 4;
use strict;
use warnings;
use Data::Dumper;

# the order is important
use App::Parrot::Create;
use Dancer::Test;

route_exists [GET => '/'], 'a route handler is defined for /';
response_status_is ['GET' => '/'], 200, 'response status is 200 for /';

route_exists [POST => '/submit'], 'a route handler is defined for /submit';

my $r = dancer_response 'POST' => '/submit', {
    params => {
        language_name => 'foo',
        builder       => 'bob',
        test_harness  => 'alice',
    },
};

response_status_is $r => 200, 'response status is 200 for /submit' or diag Dumper [ $r ];
<commit_msg>add a test for a GET on /submit<commit_after>use Test::More;
use strict;
use warnings;
use Data::Dumper;

# the order is important
use App::Parrot::Create;
use Dancer::Test;

route_exists [GET => '/'], 'a route handler is defined for /';
response_status_is ['GET' => '/'], 200, 'response status is 200 for /';

response_status_is ['GET' => '/submit'], 404, 'response status is 404 for a GET on /post';

route_exists [POST => '/submit'], 'a route handler is defined for /submit';

my $r = dancer_response 'POST' => '/submit', {
    params => {
        language_name => 'foo',
        builder       => 'bob',
        test_harness  => 'alice',
    },
};

response_status_is $r => 200, 'response status is 200 for /submit' or diag Dumper [ $r ];

done_testing;
{'fraction_non_alphanumeric': 0.16082916368834882, 'fraction_numerical': 0.02215868477483917, 'mean_word_length': 3.5161290322580645, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4969129', 'n_tokens_mistral': 480, 'n_tokens_neox': 442, 'n_words': 157}