summaryrefslogtreecommitdiff
path: root/rbejdb/test/t2.rb
diff options
context:
space:
mode:
Diffstat (limited to 'rbejdb/test/t2.rb')
-rw-r--r--rbejdb/test/t2.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/rbejdb/test/t2.rb b/rbejdb/test/t2.rb
index b52ae09..f2d2379 100644
--- a/rbejdb/test/t2.rb
+++ b/rbejdb/test/t2.rb
@@ -316,4 +316,22 @@ class EJDBTestUnit < Test::Unit::TestCase
puts "test_ejdba_id_nin has passed successfull"
end
+ def test_ejdbb_test_remove
+ assert_not_nil $jb
+ assert $jb.is_open?
+
+ obj = $jb.find_one("birds", {"name" => "Molly"})
+ assert_not_nil obj
+ assert_not_nil obj["_id"]
+ assert_equal("Very angry", obj["mood"])
+
+ #Bye bye Molly!
+ $jb.remove("birds", obj["_id"])
+
+ obj = $jb.find_one("birds", {"name" => "Molly"})
+ assert_nil obj
+
+ puts "test_ejdbb_test_remove has passed successfull"
+ end
+
end