]> git.koha-community.org Git - koha.git/commit
Bug 15159: TestBuilder behaviour on AI values should be tested
authorTomas Cohen Arazi <tomascohen@theke.io>
Mon, 9 Nov 2015 14:15:36 +0000 (11:15 -0300)
committerTomas Cohen Arazi <tomascohen@theke.io>
Tue, 17 Nov 2015 13:39:52 +0000 (10:39 -0300)
commit72d0dc6ed35ce3ea480bbc58a5518c089313894f
tree17546d0e0536662375af3e8af74bd8fb99b35b9f
parentb7c4ff5bf9e28f910801e1f1229951e61e8b23c4
Bug 15159: TestBuilder behaviour on AI values should be tested

This patch introduces a test for t::lib::TestBuilder to check it
doesn't mess with AI values. As it is generating random values based
on the defined column type, chances are that it is creating the
AI values on its own, instead of letting the DB handle it.

This could be problematic of course. This test uses the 'biblio' table
by creating two values and checking their biblionumbers are consecutive.

To test:
- Apply the patch
- Run:
  $ prove t/db_dependent/TestBuilder.t -v
=> SUCCESS: The new tests are run and:
   - biblio.biblionumber is detected as an auto-increment column
   - generated biblionumbers are consecutive
- Sign off

Regards

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
All tests successful.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
t/db_dependent/TestBuilder.t