in reply to Mojolicious Test::Mojo remote app
See Mojolicious Guides Testing: The Test::Mojo-object.
In short, yes, you can specify the entire URL to issue requests against, allowing you to test remote web applications. This works because Test::Mojo contains a Mojo::UserAgent object.
As an example:
#!/usr/bin/env perl use strict; use warnings; use Test::More; use Test::Mojo; my $t = Test::Mojo->new; $t->get_ok('https://www.perlmonks.org') ->status_is(200); done_testing();
If you run that you should see:
ok 1 - GET https://www.perlmonks.org ok 2 - 200 OK 1..2
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Mojolicious Test::Mojo remote app
by ait (Hermit) on Feb 16, 2022 at 22:56 UTC |