Writing tests for image uploading