From 1243feed4ad4c9a14262e7136f3bd5b005830427 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 2 Jan 2017 11:36:53 +0100 Subject: [PATCH] Bug 17234: Test the column and constraint non-existence Signed-off-by: Jonathan Druart --- t/db_dependent/Installer.t | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/t/db_dependent/Installer.t b/t/db_dependent/Installer.t index 46d04c0..65875b0 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 => 11; +use Test::More tests => 13; use Koha::Database; BEGIN { @@ -55,8 +55,9 @@ my $source = $schema->source('Borrower'); 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 @constraint_names = $source->unique_constraint_names(); my $constraint_name = $constraint_names[0]; -ok( constraint_exists( 'borrowers', $constraint_name ), - 'Known constraint does exist' ); +ok( constraint_exists( 'borrowers', $constraint_name), 'Known contraint does exist' ); +ok( ! constraint_exists( 'borrowers', 'xxx'), 'Constraint xxx does not exist' ); -- 2.1.4