tests for db crud