added tests for avatar endpoint