Commit graph

6 commits

Author SHA1 Message Date
565b97924e Bug 13882: Tidy t/Borrower.t to fix whitespace errors
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-08 12:19:15 -03:00
Julian FIOL
49d16fe062 Bug 13882 : Adding new unit tests in t/Borrower.t
This adds testing for all the 'borrower' database fields.

TEST PLAN
---------
1) apply patch
2) prove -v t/Borrowers.t
   -- All 67 subtests for both the setter and accessor
      should run successfully.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-08 12:17:57 -03:00
Mark Tompsett
e8b8fb3519 Bug 13928: Clean up noisy t/Borrower.t tests
While testing bug 13882, noisy messages were noticed. Also,
Test::Warn was used, but no catching attempts were made. This
patch solves that problem.

TEST PLAN
---------
1) prove -v t/Borrowers.t
   -- There should be three noisy lines.
2) apply patch
3) prove -v t/Borrowers.t
   -- There will be 3 more tests and no noisy lines.
4) Run koha qa test tool
   -- There should be no issues.

NOTE: This will conflict with bug 13882 if either gets pushed
      to master, but fixing the conflict should be easy enough.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Works as expected

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-08 12:09:01 -03:00
a23c551f30 Bug 13019 [QA Followup] - Fix stale unit test
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-12 15:21:19 -03:00
074428bb8a Bug 13019: [QA Follow-up] Rename new_from_dbic and few typos
Since new_from_dbic is not meant as a public method, this patch adds
a prefix to the name of this internal routine. For the same reason I
removed it from t/Borrower.t.
Removed one use overload-line in Objects (not used).
Resolved a few typos.

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

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-12 15:21:08 -03:00
6f0316a8d2 Bug 13019 - Add base classes on which to build Koha objects
The idea behind this is to have a pair of base classes on which to build
our new generation of Koha objects. Koha::Object is a base class, which
in it's most basic form, is to represent a row in a table. For example,
Koha::Borrower inherits from Koha::Object. So too could Koha::Biblio
and Koha::Item for example.

Koha::Objects is to represent a way to fetch and manipulate sets of
objects. For example, Koha::Borrowers has a method to get a
Koha::Borrower object by id and a method to search for an get a list
of Koha::Borrower objects. Right now Koha::Objects has only the
essentials but can easily be extended and those enhancements will be
passed down to all the child classes based on it.

By using these classes as a base, we will add consistency to our
code, allow us to keep our code DRY, reduce bugs, and encapsulate our
database access among other benefits.

Test Plan:
1) Apply this patch
2) prove t/Object.t t/db_dependent/Object.t t/db_dependent/Objects.t

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-02-12 15:21:01 -03:00