Commit graph

14 commits

Author SHA1 Message Date
b1ba7fac2c Bug 18292: Remove return 1 statements in tests
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>
2017-08-15 12:17:42 -03:00
71740f98a8 Bug 17836: (ILSDI) Regression test
Sponsored-by: ByWater Solutions

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-01-20 13:44:57 +00:00
a8f29dd3f2 Bug 16155: (QA followup) fix small bug in t/db_dependent/ILSDI_Services.t
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
With all patches applied all test pass,
all == git grep -l "use t::lib::TestBuilder" | grep -v -e 'pm$' -e Old | xargs prove

No errors

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-05-04 13:47:58 +00:00
6b28a47e8c Bug 16320: [QA Follow-up] Fix borrower attribute test in ILSDI_Services
Since bug 12267 removed the password option, this test should be
adjusted.

Test plan:
Run the test.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-29 16:02:53 +00:00
4a6fe346f0 Bug 16320: Refactor ILSDI_Services.t so it uses TestBuilder
This patch refactors the tests so they are corerctly built using TestBuilder
and wrapper inside a DB transaction in a less ambiguous way.

To test:
- Verify that the tests pass with the patch:
- Run:
  $ prove t/db_dependent/ILSDI_Services.t
=> SUCCESS: Tests pass
- Sign off :-D

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-29 16:02:53 +00:00
Katrin Fischer
4a605225cc Bug 14257: Follow-up - Add documentation, fix typo, fix test
- t/db_dependent/ILSDI_Services.t was failing for me as I had
  issues in my database, fixed with another delete line
- QA tools found a typo - comparision
- Added documentation of the new parameter to the ilsdi.pl page

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-03-31 20:31:06 +00:00
Martin Persson
f39b79982d Bug 14257 - Add show_attributes to GetPatronInfo
Added unit tests to for GetBorrowerAttributes and GetPatronInfo.

Sponsored-By: Halland County Library

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
2016-03-31 20:31:06 +00:00
4f5217314c Bug 15629: Koha::Libraries - Remove GetBranchDetail
C4::Branch::GetBranchDetail retrieved library infos, it could be easily
replaced with Koha::Libraries->find

When this change needs other big changes, the unblessed method is
called, to manipulate a hashref (as before) instead of a Koha::Library
object (for instance when $library is sent to GetPreparedLetter).

Test plan:
1/ Print a basket group, the library names should be correctly
displayed.
2/ Enable emailLibrarianWhenHoldIsPlaced and place a hold, a HOLDPLACED
notice will be generated (focus on the library name)
3/ Edit a patron and change his/her library
4/ Generate the advanced notices (misc/cronjobs/advance_notices.pl) and
have a look at the generated notices
5/ Same of overdues notices
6/ Set IndependentBranches and use a non superlibrarian user to place a
hold. The "pickup at" should be correctly filled.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
2016-02-24 03:55:06 +00:00
Jonathan Druart
e20270fec4 Bug 11944: use CGI( -utf8 ) everywhere
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-13 13:07:21 -03:00
Galen Charlton
610b414347 Bug 11891: set up tests to require that Koha::Database uses same DB handle as C4::Context
This patch removes changes in two cases to work around the fact that
Koha::Database and C4::Context were not using the same DBI database
handle.

To test:

[1] Run prove -v t/db_dependent/ILSDI_Services.t and
    prove -v t/db_dependent/Items.t.  Both tests
    should fail.
[2] Apply the main patches and run step 1 again.  This
    time, both tests should pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-06-19 11:54:45 -03:00
Galen Charlton
c4f7164cb9 Bug 6254: (follow-up) work-around to fix a failing test case
This patch ensures that a patron category that is present
in the (English) sample data is used for the ILS-DI tests,
avoiding a situation where one part of AddMember was trying
to access a patron category via DBIC but failed because
it was not visible to it yet.

Note that this will become easier once C4::Context->dbh
and DBIC are using the same base DBI database handles.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-05-26 04:19:19 +00:00
Galen Charlton
2a8481a5e2 Bug 10667: (follow-up) fix reference to UT library in test case
This patch prevents a spurious test case failure if the
test database happens to already have a library whose
code is 'UT'.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-16 19:22:22 +00:00
Katrin Fischer
ddb67e3237 Bug 10667: Allow authentication with cardnumber for ILS-DI
Test authentication via ILS-DI:
- with userid and password
- with userid and wrong password
- with cardnumber and password
- with cardnumber and wrong password
...

Before the patch only userid will authenticate the patron.
After the patch was applied, userid and cardnumber will work.

To test:
- Run t/db_dependent/ILSDI_Services.t - all tests should pass.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No koha-qa errors

Test:
Enable ISL-DI
access opac with /cgi-bin/koha/ilsdi.pl?service=AuthenticatePatron&username=XXX&password=YYY
With userid/cardnumber & password returns borrowernumber
With userid/cardnumber & wrong password returns PatronNotFound
Signed-off-by: Mason James <mtj@kohaaloha.com>

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-16 19:14:10 +00:00
Katrin Fischer
995f4b6ecb Bug 10667: Add unit tests for ILSDI::Services::AuthenticatePatron
This patch adds unit tests for Authenticate patron.

To test:
- Run perl t/db_dependent/ILSDI_Services.t
- Verify all tests pass

Note: there are some tests marked as TODO.

Rewriting AuthenticatePatron to make cardnumber and userid
work for authenticating a patron will be implemented in the
next patch. Tests related to this are currently showing as
'not ok', but are still passing.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
No koha-qa errors
With both patches applied, all test pass.
Signed-off-by: Mason James <mtj@kohaaloha.com>

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-16 19:13:34 +00:00