Test::DBIx::Class is not even used here.
Just like C4::Biblio.
We should remove TestBuilder too (this is t not t/db)!
Test plan:
Run t/Search.t
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
It seems that depending on other tests, the item could be hidden from the record, or
the entire record hidden because of the way we count hidden items.
I add a mock for the two HIddenItems prefs and hardcode an xml record
to avoid problematic data from test builder
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
# Failed test 'No tests run for subtest "searchResults PassItemMarcToXSLT test"'
# at t/Search.t line 208.
Undefined subroutine &C4::Biblio::EmbedItemsInMarcBiblio called at t/Search.t line 194.
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Use fully qualified subroutine name
Don't return explicit undef
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
The test files do not need to return 1
Patch generated with:
perl -p -i -e "s/^1;\n//xsm" t/**/*.t
Test plan:
git grep '^1;$' t/**/*.t
should not return any results
NOTE: does not fix C4/SIP/t, nor xt tests.
Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
t/00-load.t already checks if all of the perl modules can be compiled.
The tests deleted in this commit do a duplicate test with t/00-load.t
Hence they have become unnecessary.
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
To reproduce:
- Stop your MySQL server:
$ sudo service mysql stop
- Run
$ prove t/Search.t
=> FAIL: some tests fail because of mysql stopped
To test (MySQL still stopped)
- Apply the patch
- Run
$ prove t/Search.t
=> SUCCESS: tests pass because the ycan be loaded regardless of
the absence of the DB server
- Sign off :-D
Regards
Signed-off-by: Magnus Enger <digitalutvikling@gmail.com>
Turned off MySQL and ran the tests before and after the patch.
Works as advertised.
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This followup adds uint tests for the newly introduced function.
It is really basic, but covers all scenarios for the new function,
and will help us prevent regressions in future patches.
Regards
To+
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
Some minor changes to get the test suite working a bit better:
I removed a superfluous method from t/lib/KohaTest.pm.
I made each barcode for the items added in KohaTest.pm unique so that they would actually get inserted.
Then, I removed t/override_context_prefs.pm. If you need that functionality, you're a database
dependent test and should be a module in t/lib.
So, I deleted all of the trivial .t tests that just 'use'd their modules and had no other
tests and replaced them with lib/KohaTest/*pm modules that do a little bit more checking
on those modules.
I removed the references to override_context_prefs.pm in all of the other .t modules.
They all pass now with no override_context_prefs.pm module.
The database_depenedent.pl test script still does not pass entirely. There's a problem with the zebra index
not being reset each time that the tables are truncated. I'll get to that.
no functional or documentation changes here.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Many of the tests were failing or putting warnings
because a valid systempreferences table is
usaully absent by the time 'make test' is run.
Fortunately, only a few modules try to invoke
C4::Context->preference during module initialization,
so added to the test suite override_context_prefs.pm,
which replaces preference() with a sub to return
testing values for three variables: 'dateformat',
'marcflavour', and 'LibraryName'.
Also fixed bug in t/Boolean.t
With this patch and the patch to move the DB-dependent
tests off to the side for the moment, 'make test'
now runs cleanly, at least on Debian.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
Input.t was replaced because it tested a now obsolete function.
Input.pm has that function commented out.
Several files were renamed to match their counterparts or
correct misspellingz.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>