writing tests for image uploading