3 ms·
You test triggers the same way you test any code. You setup your preconditions, you execute any action, you assert your post condition. You can use something
by segmondy 9y ago
You test triggers the same way you test any code.
You setup your preconditions, you execute any action, you assert your post condition. You can use something like http://pgtap.org/documentation.html http://pgtap.org/documentation.html to write your database tests.
Triggers have a place in app development, and sometimes are the best things to use.