Bugzilla – Attachment 24422 Details for
Bug 11543
Increasing test coverage for C4::Category
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 11543: Increasing test coverage for Category.pm
PASSED-QA-Bug-11543-Increasing-test-coverage-for-C.patch (text/plain), 1.97 KB, created by
Katrin Fischer
on 2014-01-15 19:41:06 UTC
(
hide
)
Description:
[PASSED QA] Bug 11543: Increasing test coverage for Category.pm
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-01-15 19:41:06 UTC
Size:
1.97 KB
patch
obsolete
>From ab4230f4bca8df1b89777f4a1496839a23e61257 Mon Sep 17 00:00:00 2001 >From: Roman Amor <romanwilton@gmail.com> >Date: Tue, 14 Jan 2014 14:17:06 +1300 >Subject: [PATCH] [PASSED QA] Bug 11543: Increasing test coverage for > Category.pm > >To test: >1. Run prove t/db_dependent/Category.t >2. Apply patch >3. Run prove t/db_dependent/Category.t - Notice 2 tests were run > >Signed-off-by: daniel <daniel.barker.nz@gmail.com> >Made the requested changes. > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >--- > t/Category.t | 14 -------------- > t/db_dependent/Category.t | 24 ++++++++++++++++++++++++ > 2 files changed, 24 insertions(+), 14 deletions(-) > delete mode 100755 t/Category.t > create mode 100755 t/db_dependent/Category.t > >diff --git a/t/Category.t b/t/Category.t >deleted file mode 100755 >index 6c251ea..0000000 >--- a/t/Category.t >+++ /dev/null >@@ -1,14 +0,0 @@ >-#!/usr/bin/perl >-# >-# This Koha test module is a stub! >-# Add more tests here!!! >- >-use strict; >-use warnings; >- >-use Test::More tests => 1; >- >-BEGIN { >- use_ok('C4::Category'); >-} >- >diff --git a/t/db_dependent/Category.t b/t/db_dependent/Category.t >new file mode 100755 >index 0000000..056dd37 >--- /dev/null >+++ b/t/db_dependent/Category.t >@@ -0,0 +1,24 @@ >+#!/usr/bin/perl >+# >+# This Koha test module is a stub! >+# Add more tests here!!! >+ >+use strict; >+use warnings; >+ >+use Test::More tests => 2; >+ >+BEGIN { >+ use_ok('C4::Category'); >+} >+use C4::Context; >+my $dbh = C4::Context->dbh; >+$dbh->{RaiseError} = 1; >+$dbh->{AutoCommit} = 0; >+ >+my $sth=$dbh->prepare("INSERT INTO categories (categorycode,description,enrolmentperiod,enrolmentperioddate,upperagelimit,dateofbirthrequired, >+enrolmentfee,reservefee,hidelostitems,overduenoticerequired,category_type) values (?,?,?,?,?,?,?,?,?,?,?)"); >+$sth->execute("test", "Desc", 12, "2014-01-02", 99, 1, 1.5, 2.5, 0, 0, "A") || die $sth->errstr; >+ok( my @categories = C4::Category->all); >+ >+$dbh->rollback; >-- >1.8.3.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11543
:
24252
|
24257
|
24258
|
24318
|
24419
|
24420
| 24422 |
24423