Bugzilla – Attachment 44989 Details for
Bug 14889
Move the framework related code to Koha::BiblioFramework[s]
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 14889: Add tests for Koha::BiblioFramework[s]
PASSED-QA-Bug-14889-Add-tests-for-KohaBiblioFramew.patch (text/plain), 2.42 KB, created by
Katrin Fischer
on 2015-11-19 10:43:24 UTC
(
hide
)
Description:
[PASSED QA] Bug 14889: Add tests for Koha::BiblioFramework[s]
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2015-11-19 10:43:24 UTC
Size:
2.42 KB
patch
obsolete
>From 0b15a19d1bf68d378db77c41e293654ceb114808 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 26 Oct 2015 08:56:49 +0000 >Subject: [PATCH] [PASSED QA] Bug 14889: Add tests for Koha::BiblioFramework[s] > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > t/db_dependent/Koha/BiblioFrameworks.t | 43 ++++++++++++++++++++++++++++++++++ > 1 file changed, 43 insertions(+) > create mode 100644 t/db_dependent/Koha/BiblioFrameworks.t > >diff --git a/t/db_dependent/Koha/BiblioFrameworks.t b/t/db_dependent/Koha/BiblioFrameworks.t >new file mode 100644 >index 0000000..3a6accd >--- /dev/null >+++ b/t/db_dependent/Koha/BiblioFrameworks.t >@@ -0,0 +1,43 @@ >+#!/usr/bin/perl >+ >+# Copyright 2015 Koha Development team >+# >+# This file is part of Koha >+# >+# Koha is free software; you can redistribute it and/or modify it >+# under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 3 of the License, or >+# (at your option) any later version. >+# >+# Koha is distributed in the hope that it will be useful, but >+# WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License >+# along with Koha; if not, see <http://www.gnu.org/licenses>. >+ >+use Modern::Perl; >+use Test::More tests => 3; >+use Koha::BiblioFramework; >+use Koha::BiblioFrameworks; >+use t::lib::TestBuilder; >+ >+my $builder = t::lib::TestBuilder->new; >+my $nb_of_frameworks = Koha::BiblioFrameworks->search->count; >+my $new_framework_1 = Koha::BiblioFramework->new({ >+ frameworkcode => 'mfw1', >+ frameworktext => 'my_frameworktext_for_fw_1', >+})->store; >+my $new_framework_2 = Koha::BiblioFramework->new({ >+ frameworkcode => 'mfw2', >+ frameworktext => 'my_frameworktext_for_fw_2', >+})->store; >+ >+is( Koha::BiblioFrameworks->search->count, $nb_of_frameworks + 2, 'The 2 biblio frameworks should have been added' ); >+ >+my $retrieved_framework_1 = Koha::BiblioFrameworks->find( $new_framework_1->frameworkcode ); >+is( $retrieved_framework_1->frameworktext, $new_framework_1->frameworktext, 'Find a biblio framework by frameworkcode should return the correct framework' ); >+ >+$retrieved_framework_1->delete; >+is( Koha::BiblioFrameworks->search->count, $nb_of_frameworks + 1, 'Delete should have deleted the biblio framework' ); >-- >1.9.1
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 14889
:
42846
|
42847
|
43775
|
43776
|
43944
|
43974
|
43975
|
44493
|
44494
|
44495
|
44496
|
44497
|
44985
|
44986
|
44987
|
44988
| 44989 |
47857