Bug 12445: Improving unit tests for C4::Suggestions.pm
authorYohann Dufour <dufour.yohann@gmail.com>
Thu, 19 Jun 2014 07:14:24 +0000 (09:14 +0200)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Tue, 29 Jul 2014 19:23:46 +0000 (16:23 -0300)
commit9d9ab994a6b34b3d15c9816bfcb9c5a9c4985f6a
treecf40097bc1cbb8856b38eb67a0c695e11d8f0b7f
parentb93a6553300bf5462c1fbecdb8351b8c6a8edc61
Bug 12445: Improving unit tests for C4::Suggestions.pm

Now, the tests used 'is' instead of 'ok', the tests are wrapped in a transaction, adding tests for the routines NewSuggestion, GetSuggestion, ModSuggestion, GetSuggestionFromBiblionumber and GetInfoFromBiblionumber.

The tests for the routines DelSuggestionsOlderThan, CountSuggestion, ConnectSuggestionAndBiblio, SearchSuggestion, GetSuggestionInfo, DelSuggestion and GetSuggestionByStatus will be arrived in another patch.

Test plan:
1/ Execute the command : prove t/db_dependent/Suggestions.t
2/ The result has to be a success without warning or error :
t/db_dependent/Suggestions.t .. ok
All tests successful.
Files=1, Tests=32,  2 wallclock secs ( 0.03 usr  0.01 sys +  1.49 cusr  0.08 csys =  1.61 CPU)
Result: PASS

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
t/db_dependent/Suggestions.t