Bugzilla – Attachment 36166 Details for
Bug 13746
On creating a new subscription, notes fields get confused
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13746: Add tests
Bug-13746-Add-tests.patch (text/plain), 2.60 KB, created by
Jonathan Druart
on 2015-02-25 12:25:24 UTC
(
hide
)
Description:
Bug 13746: Add tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-02-25 12:25:24 UTC
Size:
2.60 KB
patch
obsolete
>From 66123efc398db8f02fb22baf411f66830867784b Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 25 Feb 2015 13:21:07 +0100 >Subject: [PATCH] Bug 13746: Add tests > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > t/db_dependent/Serials.t | 19 ++++++++++++++----- > 1 file changed, 14 insertions(+), 5 deletions(-) > >diff --git a/t/db_dependent/Serials.t b/t/db_dependent/Serials.t >index c255b9e..d04dd02 100644 >--- a/t/db_dependent/Serials.t >+++ b/t/db_dependent/Serials.t >@@ -15,7 +15,7 @@ use C4::Bookseller; > use C4::Biblio; > use C4::Budgets; > use Koha::DateUtils; >-use Test::More tests => 43; >+use Test::More tests => 47; > > BEGIN { > use_ok('C4::Serials'); >@@ -65,17 +65,26 @@ my $pattern_id = AddSubscriptionNumberpattern({ > whenmorethan1 => 1, > }); > >+my $notes = 'notes'; >+my $internalnotes = 'intnotes'; > my $subscriptionid = NewSubscription( > undef, "", undef, undef, $budget_id, $biblionumber, > '2013-01-01', $frequency_id, undef, undef, undef, > undef, undef, undef, undef, undef, undef, >- 1, "notes",undef, '2013-01-01', undef, $pattern_id, >- undef, undef, 0, "intnotes", 0, >+ 1, $notes,undef, '2013-01-01', undef, $pattern_id, >+ undef, undef, 0, $internalnotes, 0, > undef, undef, 0, undef, '2013-12-31', 0 > ); > > my $subscriptioninformation = GetSubscription( $subscriptionid ); > >+is( $subscriptioninformation->{notes}, $notes, 'NewSubscription should set notes' ); >+is( $subscriptioninformation->{internalnotes}, $internalnotes, 'NewSubscription should set internalnotes' ); >+ >+my $subscription_history = C4::Serials::GetSubscriptionHistoryFromSubscriptionId($subscriptionid); >+is( $subscription_history->{opacnote}, '', 'NewSubscription should not set subscriptionhistory opacnotes' ); >+is( $subscription_history->{librariannote}, '', 'NewSubscription should not set subscriptionhistory librariannotes' ); >+ > my @subscriptions = GetSubscriptions( $$subscriptioninformation{bibliotitle} ); > isa_ok( \@subscriptions, 'ARRAY' ); > >@@ -189,8 +198,8 @@ $subscriptionid = NewSubscription( > undef, "", undef, undef, $budget_id, $biblionumber, > '2013-01-01', $frequency_id, undef, undef, undef, > undef, undef, undef, undef, undef, undef, >- 1, "notes",undef, '2013-01-01', undef, $pattern_id, >- undef, undef, 0, "intnotes", 0, >+ 1, $notes,undef, '2013-01-01', undef, $pattern_id, >+ undef, undef, 0, $internalnotes, 0, > undef, undef, 0, undef, '2013-12-31', 0 > ); > my $total_issues; >-- >2.1.0
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 13746
:
36116
|
36126
|
36165
| 36166