Write Unit Tests for Go APIs
Asked at CircleCI · Coding Questions · Difficulty: Medium
Write unit tests to test three APIs, ensuring each API performs correctly. Specifically, verify the status codes and response data returned by the APIs are accurate. Assume that the APIs accept and return data in JSON format. Set up different mock request scenarios to cover common edge cases and errors.
Loading the problem…