Add unit test for image upload