Add tests for generate_curl_command

Fixes #314