Unit test - delete a record

I'm trying to add a unit test for a DELETE endpoint. Since I don't want to run out of records, I'd like to create a record, then delete it within the unit test. Currently I don't think there is a way to do that without creating a function that calls "externally" to my own instance's API to POST a new record and then call DELETE with that record's id.

Is there a simpler way to do this?

2 replies