Skip to content

Commit

Permalink
created unit test for read_multi with array.
Browse files Browse the repository at this point in the history
  • Loading branch information
Cameron Hurst committed May 5, 2011
1 parent 5365020 commit 1f7af65
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions test/test_active_support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,27 @@ class TestActiveSupport < Test::Unit::TestCase
end
end
end

should 'support read_multi with an array' do
with_activesupport do
memcached do
connect
case
when rails3?
x = rand_key
y = rand_key
assert_equal({}, @mc.read_multi([x, y]))
assert_equal({}, @dalli.read_multi([x, y]))
@dalli.write(x, '123')
@dalli.write(y, 123)
@mc.write(x, '123')
@mc.write(y, 123)
assert_equal({ x => '123', y => 123 }, @dalli.read_multi([x, y]))
assert_equal({}, @mc.read_multi([x,y]))
end
end
end
end

should 'support raw read_multi' do
with_activesupport do
Expand Down

0 comments on commit 1f7af65

Please sign in to comment.