test for RUBY-152
This commit is contained in:
parent
fc603c651e
commit
f62a54416d
|
@ -439,6 +439,16 @@ class TestCollection < Test::Unit::TestCase
|
|||
assert res["timeMillis"]
|
||||
end
|
||||
|
||||
def test_map_reduce_with_output_collection
|
||||
output_collection = "test-map-coll"
|
||||
m = Code.new("function() { emit(this.user_id, 1); }")
|
||||
r = Code.new("function(k,vals) { return 1; }")
|
||||
res = @@test.map_reduce(m, r, :raw => true, :out => output_collection)
|
||||
assert_equal output_collection, res["result"]
|
||||
assert res["counts"]
|
||||
assert res["timeMillis"]
|
||||
end
|
||||
|
||||
def test_allows_only_valid_keys
|
||||
m = Code.new("function() { emit(this.user_id, 1); }")
|
||||
r = Code.new("function(k,vals) { return 1; }")
|
||||
|
|
Loading…
Reference in New Issue