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!
No description
No description
2 Replies
Saber
Saber10mo ago
ActionResult doesn't, but the actual type does which is CreatedAtActionResult
clownshark5503
clownshark5503OP10mo ago
Got it working! Thank you!
Want results from more Discord servers?
Add your server