From 5878d21d97e35a2a47739e4a4ea4fe28549215d5 Mon Sep 17 00:00:00 2001 From: Karel Minarik Date: Sat, 30 Apr 2011 08:32:34 +0200 Subject: [PATCH] [TEST] Add pending test for Index#bulk_store --- lib/slingshot/index.rb | 1 + test/unit/index_test.rb | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib/slingshot/index.rb b/lib/slingshot/index.rb index b4b35098..227a42ef 100644 --- a/lib/slingshot/index.rb +++ b/lib/slingshot/index.rb @@ -82,6 +82,7 @@ def bulk_store documents id = case when document.is_a?(Hash) then document[:id] || document['id'] when document.respond_to?(:id) && document.id != document.object_id then document.id + # TODO: Raise error when no id present end $VERBOSE = old_verbose diff --git a/test/unit/index_test.rb b/test/unit/index_test.rb index 622f0fc8..9d58aa24 100644 --- a/test/unit/index_test.rb +++ b/test/unit/index_test.rb @@ -265,6 +265,10 @@ class MyDocument;end; document = MyDocument.new end end + should_eventually "raise exception when collection item does not have ID" do + # TODO: raise exception when collection item does not have ID + end + end context "when importing" do