projects
/
platform
/
upstream
/
ejdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a398ed1
)
#50 - advanced tests (test 15)
author
Fedor Yudanov
<fedwiz@academ.org>
Fri, 5 Apr 2013 13:28:58 +0000
(20:28 +0700)
committer
Fedor Yudanov
<fedwiz@academ.org>
Fri, 5 Apr 2013 13:28:58 +0000
(20:28 +0700)
rbejdb/test/t2.rb
patch
|
blob
|
history
diff --git
a/rbejdb/test/t2.rb
b/rbejdb/test/t2.rb
index
5f8ec26
..
50be66c
100644
(file)
--- a/
rbejdb/test/t2.rb
+++ b/
rbejdb/test/t2.rb
@@
-398,4
+398,18
@@
class EJDBTestUnit < Test::Unit::TestCase
puts "test_ejdbd_tx1 has passed successfull"
end
+
+ def test_ejdbe_create_collection_on_upsert
+ assert_not_nil $jb
+ assert $jb.is_open?
+
+ results = $jb.update("upsertcoll", {:foo => "bar", "$upsert" => {:foo => "bar"}})
+ assert_equal(1, results.count)
+
+ obj = $jb.find_one("upsertcoll", {:foo => "bar"})
+ assert_equal("bar", obj["foo"])
+
+ puts "test_ejdbe_create_collection_on_upsert has passed successfull"
+ end
+
end