spec/seasyar_spec.rb in seasyar-0.0.13 vs spec/seasyar_spec.rb in seasyar-0.0.14

- old
+ new

@@ -27,10 +27,14 @@ def removal unindex INDEX_NAME end + def save_for_reindex + reindex INDEX_NAME, :static + end + def id @id end def static @@ -83,7 +87,16 @@ d = Dummy.new 4711, key d.save stamp = Seasyar::SeasyData.find_by_key( key ).updated_at d.save_unchanged Seasyar::SeasyData.find_by_key( key ).updated_at.should == stamp + end + + it "reindex should always save" do + key = 'nonchanging' + d = Dummy.new 4711, key + d.save + stamp = Seasyar::SeasyData.find_by_key( key ).updated_at + d.save_for_reindex + Seasyar::SeasyData.find_by_key( key ).updated_at.should > stamp end end \ No newline at end of file