Skip to content

Commit

Permalink
better authentication example for Test::Mojo
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Apr 1, 2013
1 parent 45a4629 commit b89f57d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Changes
@@ -1,5 +1,5 @@

3.92 2013-03-30
3.92 2013-04-02
- Added monotonic clock support to make Mojolicious more resilient to time
jumps.
- Added steady_time function to Mojo::Util.
Expand Down
6 changes: 4 additions & 2 deletions lib/Test/Mojo.pm
Expand Up @@ -469,8 +469,10 @@ User agent used for testing, defaults to a L<Mojo::UserAgent> object.
$tx->req->headers->accept_language('en-US');
});
# Request with Basic authentication
$t->get_ok($t->ua->app_url->userinfo('sri:secr3t')->path('/secrets'));
# Use absolute URL for request with Basic authentication
$t->get_ok($t->ua->app_url->userinfo('sri:secr3t')->path('/secrets.json'))
->status_is(200)
->json_is('/1/content', 'Mojo rocks!');
=head1 METHODS
Expand Down

0 comments on commit b89f57d

Please sign in to comment.