Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
test return values
  • Loading branch information
kraih committed Sep 26, 2014
1 parent 4642a80 commit 1fa9f44
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions t/mojo/cache.t
Expand Up @@ -25,8 +25,7 @@ is $cache->get('two'), 2, 'right result';

$cache = Mojo::Cache->new(max_keys => 3);
is $cache->get('foo'), undef, 'no result';
$cache->set(foo => 'bar');
is $cache->get('foo'), 'bar', 'right result';
is $cache->set(foo => 'bar')->get('foo'), 'bar', 'right result';
$cache->set(bar => 'baz');
is $cache->get('foo'), 'bar', 'right result';
is $cache->get('bar'), 'baz', 'right result';
Expand All @@ -42,8 +41,7 @@ is $cache->get('yada'), 23, 'right result';

$cache = Mojo::Cache->new(max_keys => 0);
is $cache->get('foo'), undef, 'no result';
$cache->set(foo => 'bar');
is $cache->get('foo'), undef, 'no result';
is $cache->set(foo => 'bar')->get('foo'), undef, 'no result';
$cache = Mojo::Cache->new(max_keys => -1);
is $cache->get('foo'), undef, 'no result';
$cache->set(foo => 'bar');
Expand Down

0 comments on commit 1fa9f44

Please sign in to comment.