Bugzilla – Attachment 27165 Details for
Bug 11630
AgeRestrictionMarker doesn't handle marker immediately followed by age
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11630: Unit tests can be independent of DB
Bug-11630-Unit-tests-can-be-independent-of-DB.patch (text/plain), 1.65 KB, created by
Jonathan Druart
on 2014-04-16 10:56:57 UTC
(
hide
)
Description:
Bug 11630: Unit tests can be independent of DB
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-04-16 10:56:57 UTC
Size:
1.65 KB
patch
obsolete
>From 8f5470aba3c2cbcfc83059222422723531aa32b8 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 16 Apr 2014 12:46:36 +0200 >Subject: [PATCH] Bug 11630: Unit tests can be independent of DB > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > t/{db_dependent => }/Circulation/AgeRestrictionMarkers.t | 12 +++++------- > 1 file changed, 5 insertions(+), 7 deletions(-) > rename t/{db_dependent => }/Circulation/AgeRestrictionMarkers.t (64%) > >diff --git a/t/db_dependent/Circulation/AgeRestrictionMarkers.t b/t/Circulation/AgeRestrictionMarkers.t >similarity index 64% >rename from t/db_dependent/Circulation/AgeRestrictionMarkers.t >rename to t/Circulation/AgeRestrictionMarkers.t >index c06776a..619e4ea 100644 >--- a/t/db_dependent/Circulation/AgeRestrictionMarkers.t >+++ b/t/Circulation/AgeRestrictionMarkers.t >@@ -1,17 +1,15 @@ > use Modern::Perl; >-use Test::More tests => 4; >+use Test::More tests => 5; > >-use C4::Context; >-use C4::Circulation; >+use t::lib::Mocks; > >-my $dbh = C4::Context->dbh; >-$dbh->{AutoCommit} = 0; >-$dbh->{RaiseError} = 1; >+use C4::Circulation; > >-C4::Context->set_preference( 'AgeRestrictionMarker', 'FSK|PEGI|Age|K' ); >+t::lib::Mocks::mock_preference( 'AgeRestrictionMarker', 'FSK|PEGI|Age|K' ); > > is ( C4::Circulation::GetAgeRestriction('FSK 16'), '16', 'FSK 16 returns 16' ); > is ( C4::Circulation::GetAgeRestriction('PEGI 16'), '16', 'PEGI 16 returns 16' ); >+is ( C4::Circulation::GetAgeRestriction('PEGI16'), '16', 'PEGI16 returns 16' ); > is ( C4::Circulation::GetAgeRestriction('Age 16'), '16', 'Age 16 returns 16' ); > is ( C4::Circulation::GetAgeRestriction('K16'), '16', 'K16 returns 16' ); > >-- >1.7.10.4
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 11630
:
24857
|
26996
|
27089
|
27156
|
27163
|
27164
| 27165