spec/dynamoid/indexes/index_spec.rb in dynamoid-0.3.1 vs spec/dynamoid/indexes/index_spec.rb in dynamoid-0.3.2

- old
+ new

@@ -92,9 +92,12 @@ it 'updates an object by removing it from its previous index and adding it to its new one' do @index = Dynamoid::Indexes::Index.new(User, :name) @user = User.create(:name => 'Josh', :password => 'test123', :last_logged_in_at => @time, :id => 'test123') + Dynamoid::Adapter.read("dynamoid_tests_index_user_names", 'Josh')[:ids].should == Set['test123'] + Dynamoid::Adapter.read("dynamoid_tests_index_user_names", 'Justin').should be_nil + @user.update_attributes(:name => 'Justin') Dynamoid::Adapter.read("dynamoid_tests_index_user_names", 'Josh')[:ids].should be_nil Dynamoid::Adapter.read("dynamoid_tests_index_user_names", 'Justin')[:ids].should == Set['test123'] end