test and fix for Grid#delete
This commit is contained in:
parent
3fdd8c3f7a
commit
aa86c03bd5
|
@ -78,7 +78,7 @@ module Mongo
|
|||
# @return [Boolean]
|
||||
def delete(id)
|
||||
@files.remove({"_id" => id})
|
||||
@chunks.remove({"_id" => id})
|
||||
@chunks.remove({"files_id" => id})
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -42,6 +42,7 @@ class GridTest < Test::Unit::TestCase
|
|||
assert_raise GridError do
|
||||
@grid.get(@id)
|
||||
end
|
||||
assert_equal nil, @db['test-fs']['chunks'].find_one({:files_id => @id})
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue