test/test_leanback.rb in leanback-0.2.4 vs test/test_leanback.rb in leanback-0.2.5
- old
+ new
@@ -115,9 +115,16 @@
#puts e.to_s
#puts e.error
end
end
+ should "update the document" do
+ #data = {"age" => "42", "lastname" => "arnold", "phone" => "202-456-1234", "hobbies" => "football,running, video gamess" }
+ data = {"age" => "13" }
+ doc = { :database => 'contacts', :doc_id => 'john', :data => data}
+ Document.update doc
+ end
+
should "edit a document - handle exceptions" do
begin
data = {:firstname => 'john', :lastname =>'smith', :email => 'john@mail.com',:gender=>'male', :_rev=>'2-e813a0e902e3ac114400ff3959a2adde'}
doc = {:database => 'contacts', :doc_id => 'john', :data => data}
hash = Document.edit doc