-
Task
-
Resolution: Won't Do
-
Major
-
None
-
None
-
None
-
False
-
-
False
-
No
-
-
WHAT
In the webhook hander create function when there is no error the return type is nil, nil. This is a bad practice and makes the testability harder.
In this case it the unit test was only checking the response code as there is no response body. There was some test case that were failing but reporting passed because the create if it could not match the input message would return status 200 for unrecognised job types to avoid creating retry loops.
If the response body was supplied and checked in the test case the misleading passing test case would have being found sooner.
The ask here is to update the return types for the function to provide correct body responses based on the trigger for the return and update the test to check the response body.
HOW
TESTS
DONE
- create function returns the valid response bodies
- create function test check for valid response bodies in its test cases.