#!/usr/bin/env perl use Test::More; use Mojo::File qw{curfile}; use Test::Mojo; my $script = curfile->dirname->sibling('www-swagg.pl'); my $t = Test::Mojo->new($script); my @routes = ('', 'ula6', 'die', 'me', 'news', 'portal'); my %guest_form = ( name => 'AliceTug', location => 'Reston, VA', message => 'Ayy... lmao' ); # GET Requests for my $route (@routes) { $t->get_ok("/$route")->status_is(200) } # CGI Scripts for my $script (qw{guest whoami}) { $t->get_ok("/cgi-bin/$script.cgi")->status_is(200) } # ULA Tool $t->get_ok('/ula6', form => {macaddr => 'ea:88:5e:3f:a3:34'})->status_is(200); # POST Requests $t->post_ok('/cgi-bin/guest.cgi', form => \%guest_form)->status_is(200); # Resume files $t->get_ok('/resume/dbowling-resume.odt')->status_is(200); $t->get_ok('/resume/dbowling-resume.docx')->status_is(200); done_testing();