Skip to content

Commit

Permalink
fixed JSON tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed May 15, 2013
1 parent ef7170b commit 47cd205
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Test/Mojo.pm
Expand Up @@ -161,8 +161,8 @@ sub json_hasnt {
}

sub json_is {
my ($self, $p) = (shift, shift);
my $data = ref $p ? $p : shift;
my $self = shift;
my ($p, $data) = ref $_[0] ? ('', shift) : (shift, shift);
my $desc = shift || qq{exact match for JSON Pointer "$p"};
return $self->_test('is_deeply', $self->tx->res->json($p), $data, $desc);
}
Expand All @@ -180,8 +180,8 @@ sub json_message_hasnt {
}

sub json_message_is {
my ($self, $p) = (shift, shift);
my $data = ref $p ? $p : shift;
my $self = shift;
my ($p, $data) = ref $_[0] ? ('', shift) : (shift, shift);
my $desc = shift || qq{exact match for JSON Pointer "$p"};
return $self->_test('is_deeply', $self->_json(get => $p), $data, $desc);
}
Expand Down

0 comments on commit 47cd205

Please sign in to comment.