-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c5a41c6
commit 6259e06
Showing
2 changed files
with
29 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
use Mojo::Base -strict; | ||
|
||
use Test::More; | ||
use Test::Mojo; | ||
|
||
#plan skip_all => 'set TEST_ONLINE to enable this test' | ||
# unless $ENV{TEST_ONLINE}; | ||
|
||
use Mango; | ||
|
||
my $t = Test::Mojo->new('Lrrr'); | ||
|
||
# Clean up before start | ||
my $collection = $t->app->mango->db->collection('users'); | ||
$collection->drop if $collection->options; | ||
#$collection->create; | ||
|
||
# insert user and pass | ||
$collection->insert({username => 'bender', password => 'rodriguez'}); | ||
# test login, hidden | ||
$t->post_ok('/login' => form => { u => 'bender', p => 'rodriguez' })->status_is(200)->content_like(qr/ok/i); | ||
|
||
# Cleanup at end | ||
$collection->drop; | ||
|
||
done_testing(); |