Bugzilla – Attachment 37624 Details for
Bug 13940
Testing C4::OAI::Sets
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13940 : (QA followup) Add tests for the 2 warnings which was not tested
Bug-13940--QA-followup-Add-tests-for-the-2-warning.patch (text/plain), 1.88 KB, created by
Julian FIOL
on 2015-04-09 14:29:34 UTC
(
hide
)
Description:
Bug 13940 : (QA followup) Add tests for the 2 warnings which was not tested
Filename:
MIME Type:
Creator:
Julian FIOL
Created:
2015-04-09 14:29:34 UTC
Size:
1.88 KB
patch
obsolete
>From 51861c1c4fcebc9ae417e802fa221da7e9beb4de Mon Sep 17 00:00:00 2001 >From: Julian FIOL <julian.fiol@biblibre.com> >Date: Thu, 9 Apr 2015 16:22:48 +0200 >Subject: [PATCH] Bug 13940 : (QA followup) Add tests for the 2 warnings which > was not tested > >--- > t/db_dependent/OAI/Sets.t | 19 ++++++++++--------- > 1 file changed, 10 insertions(+), 9 deletions(-) > >diff --git a/t/db_dependent/OAI/Sets.t b/t/db_dependent/OAI/Sets.t >index 07aa4d4..932e457 100644 >--- a/t/db_dependent/OAI/Sets.t >+++ b/t/db_dependent/OAI/Sets.t >@@ -18,8 +18,9 @@ > > use Modern::Perl; > use C4::Context; >-use Test::More tests => 145; >+use Test::More tests => 147; > use Test::MockModule; >+use Test::Warn; > > > BEGIN { >@@ -88,9 +89,12 @@ ok (!defined(AddOAISet($set_without_name)), 'AddOAISet without "name" field is u > 'spec' => 'specWrong', > 'name' => 'nameWrong', > }; >- my $setWrong_id = AddOAISet($setWrong); >+ my $setWrong_id; >+ warning_is { $setWrong_id = AddOAISet($setWrong) } >+ 'AddOAISet failed', >+ 'AddOAISet raises warning if there is a problem with SET spec or SET name'; > >- DelOAISet($setWrong_id); >+ ok(!defined $setWrong_id, '$setWrong_id is not defined'); > } > > #Adding a Set without description >@@ -197,8 +201,9 @@ my $new_set_without_id = { > 'name' => 'nameNoSpec', > 'descriptions' => ['descNoSpecNoName'], > }; >-ok (!defined(ModOAISet($new_set_without_id)), 'ModOAISet without "id" field is undef'); >- >+warning_is { ModOAISet($new_set_without_id) } >+ 'Set ID not defined, can\'t modify the set', >+ 'ModOAISet raises warning if Set ID is not defined'; > > my $new_set_without_spec_and_name = { > 'id' => $set1_id, >@@ -595,10 +600,6 @@ my @setsNotEq = CalcOAISetsBiblio($record); > is_deeply(@setsNotEq, $setNotVH_id, 'The $record only belongs to $setNotVH'); > > >-# >- >- >- > > # ---------- Subs -------------------------------- > >-- >2.3.3
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 13940
:
37429
|
37433
|
37438
|
37454
|
37602
| 37624 |
37625