tests for update and insert