2021-12-10 22:02:42 +00:00
|
|
|
#!/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 = (
|
2021-12-10 23:45:59 +00:00
|
|
|
name => 'AliceTug',
|
2021-12-10 22:02:42 +00:00
|
|
|
location => 'Reston, VA',
|
|
|
|
message => 'Ayy... lmao'
|
|
|
|
);
|
|
|
|
|
2022-01-12 01:59:27 +00:00
|
|
|
# Routes
|
2021-12-10 22:02:42 +00:00
|
|
|
for my $route (@routes) {
|
|
|
|
$t->get_ok("/$route")->status_is(200)
|
|
|
|
}
|
2022-01-12 01:59:27 +00:00
|
|
|
|
2021-12-10 22:02:42 +00:00
|
|
|
# CGI Scripts
|
2022-01-12 01:59:27 +00:00
|
|
|
$t->get_ok('/cgi-bin/whoami.cgi')->status_is(200);
|
|
|
|
$t->get_ok('/cgi-bin/guest.cgi' )->status_is(302);
|
|
|
|
|
2021-12-10 22:02:42 +00:00
|
|
|
# ULA Tool
|
|
|
|
$t->get_ok('/ula6', form => {macaddr => 'ea:88:5e:3f:a3:34'})->status_is(200);
|
|
|
|
|
2022-01-06 02:31:31 +00:00
|
|
|
# Resume files
|
|
|
|
$t->get_ok('/resume/dbowling-resume.odt')->status_is(200);
|
|
|
|
$t->get_ok('/resume/dbowling-resume.docx')->status_is(200);
|
|
|
|
|
2021-12-10 22:02:42 +00:00
|
|
|
done_testing();
|