Bugzilla – Attachment 87512 Details for
Bug 22472
Should column_exists explode if the table does not exist?
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22472: Add tests
Bug-22472-Add-tests.patch (text/plain), 1.36 KB, created by
Martin Renvoize (ashimema)
on 2019-04-08 12:52:21 UTC
(
hide
)
Description:
Bug 22472: Add tests
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2019-04-08 12:52:21 UTC
Size:
1.36 KB
patch
obsolete
>From 860c0775b40401a527da68b8a5a8479f2ee3f0a3 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 7 Mar 2019 09:14:06 -0300 >Subject: [PATCH] Bug 22472: Add tests > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > t/db_dependent/Installer.t | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/Installer.t b/t/db_dependent/Installer.t >index 0b4cfa2d5b..636af43618 100644 >--- a/t/db_dependent/Installer.t >+++ b/t/db_dependent/Installer.t >@@ -22,7 +22,7 @@ > # Add more tests here!!! > > use Modern::Perl; >-use Test::More tests => 15; >+use Test::More tests => 16; > use Koha::Database; > > BEGIN { >@@ -56,7 +56,11 @@ my @column_names = $source->columns(); > my $column_name = $column_names[0]; > ok( column_exists( 'borrowers', $column_name ), 'Known column does exist' ); > ok( ! column_exists( 'borrowers', 'xxx'), 'Column xxx does not exist' ); >- >+{ >+ my $dbh = C4::Context->dbh; >+ $dbh->{RaiseError} = 1; >+ ok( ! column_exists( 'this_table_will_never_exist', 'xxx'), 'Column xxx does not exist, the table does not exist' ); >+} > my @constraint_names = $source->unique_constraint_names(); > my $constraint_name = $constraint_names[0]; > ok( index_exists( 'borrowers', $constraint_name), 'Known contraint does exist' ); >-- >2.20.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 22472
:
86240
|
86241
|
87381
|
87382
| 87512 |
87513
|
89566
|
89567