]> git.koha-community.org Git - koha.git/commit
Bug 18976: Fix t/db_dependent/Auth.t cleanup
authorLari Taskula <lari.taskula@jns.fi>
Mon, 24 Jul 2017 13:43:18 +0000 (16:43 +0300)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 31 Jul 2017 07:20:47 +0000 (09:20 +0200)
commit3af7ba521b699c760f5ed6555cc75b7cac7067a4
tree6edbb3ee450f3b36855e603f684dc730e59101ea
parent7a9bd6247b2bb079837f170179e12d731222fb65
Bug 18976: Fix t/db_dependent/Auth.t cleanup

Test t/db_dependent/Auth.t seems to have an ineffective test data cleanup.
Data generated by TestBuilder is left in borrowers, branches, categories,
sms_providers and sessions tables after the test.

To replicate:
1. Check the row count of borrowers, branches and categories tables
2. prove t/db_dependent/Auth.t
3. Repeat step 1
4. Observe borrowers the following tables have increased in row count:
   - borrowers
   - branches
   - categories
   - sessions
   - sms_providers

To test:
1. Before applying the patch, go through steps at "To replicate" plan
2. Apply patch
3. Go through steps at "To replicate" plan
4. Observe step 4 no longer applies and those tables have the same number of
   rows as before executing the test.

This issue has been happening in REST tests as well, and this solution is
directly copy-pasted from t/db_dependent/api/v1/cities.t

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 99d18bf0f3f729261b6560f0dd3c5d757aba3a19)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
t/db_dependent/Auth.t