Bugzilla – Attachment 29686 Details for
Bug 10519
Suggestions: 'Organize by' and correct display of tab descriptions broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10519: (followup) unit tests leave problematic cruft
Bug-10519-followup-unit-tests-leave-problematic-cr.patch (text/plain), 3.09 KB, created by
Tomás Cohen Arazi (tcohen)
on 2014-07-14 19:34:01 UTC
(
hide
)
Description:
Bug 10519: (followup) unit tests leave problematic cruft
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2014-07-14 19:34:01 UTC
Size:
3.09 KB
patch
obsolete
>From abd6de7da1f5c33694fc4a29a4e7f7f6aa2c222e Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Mon, 14 Jul 2014 16:29:38 -0300 >Subject: [PATCH] Bug 10519: (followup) unit tests leave problematic cruft > >On testing I've found that t/db_dependent/Suggestions.t leaves >cruft on the DB. Small followup for that. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> >--- > t/db_dependent/Suggestions.t | 38 ++++++++++++++++++++++++++++++-------- > 1 file changed, 30 insertions(+), 8 deletions(-) > >diff --git a/t/db_dependent/Suggestions.t b/t/db_dependent/Suggestions.t >index 252c423..f352ff5 100644 >--- a/t/db_dependent/Suggestions.t >+++ b/t/db_dependent/Suggestions.t >@@ -1,27 +1,47 @@ > #!/usr/bin/perl >+ >+# 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. > # >-# This Koha test module is a stub! >-# Add more tests here!!! >+# You should have received a copy of the GNU General Public License >+# along with Koha; if not, see <http://www.gnu.org/licenses>. > >-use strict; >-use warnings; >-use Data::Dumper; >+use Modern::Perl; > > use C4::Suggestions; > >-use Test::More tests => 13; >+use Test::More tests => 14; >+use Test::Warn; > > BEGIN { > use_ok('C4::Suggestions'); > use_ok('C4::Koha'); > } > >+my $dbh = C4::Context->dbh; >+ >+# Start transaction >+$dbh->{AutoCommit} = 0; >+$dbh->{RaiseError} = 1; >+ > my ($suggestionid, $suggestion, $status, $biblionumber); > $biblionumber = 1; > ok($suggestionid= NewSuggestion( {title=>'Petit traité de philosohpie',author=>'Hubert de Chardassé',publishercode=>'Albin Michel'} ), "NewSuggestion OK"); > ok($suggestion= GetSuggestion( $suggestionid), "GetSuggestion OK"); > ok($status= ModSuggestion( {title=>'test Modif Simple', suggestionid=>$suggestionid} ), "ModSuggestion Simple OK"); >-ok($status= ModSuggestion( {STATUS=>'STALLED', suggestionid=>$suggestionid} ), "ModSuggestion Status OK"); >+warning_is { $status = ModSuggestion( {STATUS=>'STALLED', suggestionid=>$suggestionid} )} >+ "No suggestions STALLED letter transported by email", >+ "ModSuggestion status warning is correct"; >+ok( $status, "ModSuggestion Status OK"); > ok($status= ModSuggestion( {suggestionid => $suggestionid, biblionumber => $biblionumber } ), "ModSuggestion, set biblionumber OK" ); > ok($suggestion= GetSuggestionFromBiblionumber( $biblionumber ), "GetSuggestionFromBiblionumber OK"); > ok($suggestion= GetSuggestionInfoFromBiblionumber( $biblionumber ), "GetSuggestionInfoFromBiblionumber OK"); >@@ -38,4 +58,6 @@ ok(scalar @$itemtypes2, "Purchase suggestion itemtypes collected, default Advanc > > is_deeply($itemtypes1, $itemtypes2, 'same set of purchase suggestion formats retrieved'); > >-##EO Bug 11466 >+$dbh->rollback; >+ >+1; >-- >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 10519
:
19300
|
19327
|
19340
|
19341
|
19355
|
19356
|
19364
|
28763
|
28850
|
28851
|
28852
|
29598
|
29599
| 29686