Unit Testing(post request) confusion with ActionResult[Solved]
Hello! I've written a unit test for a post request method which inserts a record into a database(postgres).
When I examine the variable
result
its says the status code is 201.
However I get a error message(included in the second screen shot) telling me ActionResult does not contain a definition for StatusCode.
Something is flying over my head but I haven't been able to figure that out myself. Can anyone point me in the right direction?
Thank you!2 Replies
ActionResult
doesn't, but the actual type does which is CreatedAtActionResult
Got it working! Thank you!