Skip to content

Commit

Permalink
test needs to clean itself up + test for the correct thing
Browse files Browse the repository at this point in the history
  • Loading branch information
njlg committed Jul 1, 2016
1 parent 0411231 commit defca2f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions t/admin.t
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ is_deeply [ sort keys %{ $res->response->{permissions_changes}->[0] } ],
is_deeply $res->response->{permissions_changes}->[0],
{
'new_val' => { 'read' => r->true, 'write' => r->true },
'old_val' => { 'write' => r->true, 'read' => r->true }
'old_val' => undef
},
'Correct structure returned';

Expand All @@ -148,7 +148,7 @@ is $res->response->{granted}, 1, 'Correct response';
is_deeply $res->response->{permissions_changes}->[0],
{
'new_val' => { 'read' => r->true, 'write' => r->false, 'connect' => r->false, 'config' => r->false },
'old_val' => { 'read' => r->true, 'write' => r->false, 'connect' => r->false, 'config' => r->false }
'old_val' => undef
},
'Correct structure returned';

Expand Down Expand Up @@ -308,4 +308,10 @@ $res = r->table('marvel')->wait->run;
is $res->type, 1, 'Correct response type';
is $res->response->{ready}, 1, 'Correct response type';

# clean up
r->db('test')->drop->run;
r->db('rethinkdb')->table('users')->get('chatapp')->delete->run;
r->db('rethinkdb')->table('users')->get('monitoring')->delete->run;
r->db('rethinkdb')->table('users')->get('bob')->delete->run;

done_testing();

0 comments on commit defca2f

Please sign in to comment.