From 89b3b35e6255474ec9e6ae8860960ff250d622ba Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 14 Jan 2014 21:42:45 +0000 Subject: [PATCH] Bug 11541: (follow-up) update tests This patch updates some of the tests to more clearly check that fields in the C4::Installer object are getting set correctly from the context. Signed-off-by: Galen Charlton --- t/Installer.t | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/t/Installer.t b/t/Installer.t index cc786d879d..1fc9fc44be 100644 --- a/t/Installer.t +++ b/t/Installer.t @@ -13,12 +13,11 @@ BEGIN { use_ok('C4::Installer'); } -my $self; ok ( my $installer = C4::Installer->new(), 'Testing NewInstaller' ); -ok ( my $class = {shift}, 'Testing Shift' ); -ok ( $self->{'dbname'} = C4::Context->config("database"), 'Testing DbName' ); -ok ( $self->{'dbms'} = C4::Context->config("db_scheme") ? C4::Context->config("db_scheme") : "mysql", 'Testing DbScheme' ); -ok ( $self->{'hostname'} = C4::Context->config("hostname"), 'Testing Hostname' ); -ok ( $self->{'port'} = C4::Context->config("port"), 'Testing Port' ); -ok ( $self->{'user'} = C4::Context->config("user"), 'Testing User' ); -ok ( $self->{'password'} = C4::Context->config("pass"), 'Testing Password' ); +is ( ref $installer, 'C4::Installer', 'Testing class of object' ); +is ( $installer->{'dbname'}, C4::Context->config("database"), 'Testing DbName' ); +is ( $installer->{'dbms'}, C4::Context->config("db_scheme") ? C4::Context->config("db_scheme") : "mysql", 'Testing DbScheme' ); +is ( $installer->{'hostname'}, C4::Context->config("hostname"), 'Testing Hostname' ); +is ( $installer->{'port'}, C4::Context->config("port"), 'Testing Port' ); +is ( $installer->{'user'}, C4::Context->config("user"), 'Testing User' ); +is ( $installer->{'password'}, C4::Context->config("pass"), 'Testing Password' ); -- 2.39.2