testfixtures icon indicating copy to clipboard operation
testfixtures copied to clipboard

Add a new function to delete data after each test case

Open cheonglam opened this issue 3 years ago • 1 comments

Like

fixtures.Delete(), which will clean all the tables

Now, koad a fixtures with null yaml file will lead to "testfixtures: fixture is not a slice or map" error

I want a delegate method to clear the database

cheonglam avatar Nov 10 '21 06:11 cheonglam

This might be possible by using the code below:

https://github.com/go-testfixtures/testfixtures/blob/0276a8f9f40ca6c5466287655472b2349c79182d/testfixtures.go#L360-L370

take avatar Nov 12 '21 02:11 take