Added db constraints check tests