Bugzilla – Attachment 43917 Details for
Bug 14248
Optionally display authorship for news items
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 14248: Regression tests requested
PASSED-QA-Bug-14248-Regression-tests-requested.patch (text/plain), 2.64 KB, created by
Katrin Fischer
on 2015-10-24 11:34:20 UTC
(
hide
)
Description:
[PASSED QA] Bug 14248: Regression tests requested
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2015-10-24 11:34:20 UTC
Size:
2.64 KB
patch
obsolete
>From 88e20a45ccb792f9fbe9b46c1823d4e92f81291a Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Thu, 22 Oct 2015 08:52:33 -0400 >Subject: [PATCH] [PASSED QA] Bug 14248: Regression tests requested > >TEST PLAN >--------- >1) apply patch >2) prove -v t/db_dependent/NewsChannels.t >3) run koha qa test tools. > >Signed-off-by: Martin Persson <xarragon@gmail.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > t/db_dependent/NewsChannels.t | 33 ++++++++++++++++++++++++++++++++- > 1 file changed, 32 insertions(+), 1 deletion(-) > >diff --git a/t/db_dependent/NewsChannels.t b/t/db_dependent/NewsChannels.t >index 3818dac..1928b46 100644 >--- a/t/db_dependent/NewsChannels.t >+++ b/t/db_dependent/NewsChannels.t >@@ -3,7 +3,7 @@ > use Modern::Perl; > use C4::Dates qw(format_date); > use C4::Branch qw(GetBranchName); >-use Test::More tests => 11; >+use Test::More tests => 12; > > BEGIN { > use_ok('C4::NewsChannels'); >@@ -178,4 +178,35 @@ ok( $opac_news_count >= 2, 'Successfully tested get_opac_news for LIB1!' ); > ( $opac_news_count, $arrayref_opac_news ) = GetNewsToDisplay( q{}, 'LIB1' ); > ok( $opac_news_count >= 2, 'Successfully tested GetNewsToDisplay for LIB1!' ); > >+# Regression test 14248 -- make sure author_title, author_firstname, and >+# author_surname exist. >+ >+subtest 'Regression tests on author title, firstname, and surname.', sub { >+ my ( $opac_news_count, $opac_news ) = get_opac_news( 0, q{}, 'LIB1' ); >+ my $check = 0; # bitwise flag to confirm NULL and not NULL borrowernumber. >+ ok($opac_news_count>0,'Data exists for regression testing'); >+ foreach my $news_item (@$opac_news) { >+ ok(exists $news_item->{author_title}, 'Author title exists'); >+ ok(exists $news_item->{author_firstname},'Author first name exists'); >+ ok(exists $news_item->{author_surname}, 'Author surname exists'); >+ if ($news_item->{borrowernumber}) { >+ ok(defined $news_item->{author_title} || >+ defined $news_item->{author_firstname} || >+ defined $news_item->{author_surname}, 'Author data defined'); >+ $check = $check | 2; # bitwise flag; >+ } >+ else { >+ ok(!defined $news_item->{author_title}, >+ 'Author title undefined as expected'); >+ ok(!defined $news_item->{author_firstname}, >+ 'Author first name undefined as expected'); >+ ok(!defined $news_item->{author_surname}, >+ 'Author surname undefined as expected'); >+ $check = $check | 1; # bitwise flag; >+ } >+ } >+ ok($check==3,'Both with and without author data tested'); >+ done_testing(); >+}; >+ > $dbh->rollback; >-- >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 14248
:
39363
|
39415
|
39441
|
43046
|
43421
|
43766
|
43769
|
43916
| 43917 |
43918