diff --git a/Changelog b/Changelog index 24332dd3c3..8de1e4520c 100644 --- a/Changelog +++ b/Changelog @@ -5,6 +5,7 @@ Supported Presently Changelog for 1.3.45 * Cleaned up sql files so App::LedgerSMB::Admin (Chris T) * Fixed pricematrix prices not respected for vendors (Chris T, bug 1230) +* Added tests for Sysconfig (Chris T, bug 1232) Chris T is Chris Travers diff --git a/t/12-sysconfig.t b/t/12-sysconfig.t new file mode 100644 index 0000000000..651c27a150 --- /dev/null +++ b/t/12-sysconfig.t @@ -0,0 +1,24 @@ +use Test::More tests => 13; + +chdir 't/data'; + +require '../../LedgerSMB/Sysconfig.pm'; + +is $LedgerSMB::Sysconfig::auth, 'DB2', 'Auth set correctly'; +is $LedgerSMB::Sysconfig::logging, 1, 'Correct logging settings'; +is $LedgerSMB::Sysconfig::tempdir, 'test', 'tempdir set correctly'; +is $LedgerSMB::Sysconfig::cssdir, 'css3/', 'css dir set correctly'; +is $LedgerSMB::Sysconfig::fs_cssdir, 'css4', 'css fs dir set correctly'; +is $LedgerSMB::Sysconfig::cache_templates, 5, 'template caching working'; +is $LedgerSMB::Sysconfig::language, 'en2', 'language set correctly'; +is $LedgerSMB::Sysconfig::check_max_invoices, '52', + 'max invoices set correctly'; +is $LedgerSMB::Sysconfig::max_post_size, 4194304333, + 'max post size set correctly'; +is $LedgerSMB::Sysconfig::decimal_places, 22, 'money places set correctly'; + +is $LedgerSMB::Sysconfig::cookie_name, 'LedgerSMB-1.32', 'cookie set correctly'; +is $LedgerSMB::Sysconfig::no_db_str, 'database2', + 'missing db string set correctly'; +like $ENV{PATH}, '/foo$/', 'appends config path correctly'; + diff --git a/t/data/ledgersmb.conf b/t/data/ledgersmb.conf index 4992f9810b..da6ca7288a 100644 --- a/t/data/ledgersmb.conf +++ b/t/data/ledgersmb.conf @@ -1,7 +1,7 @@ auth : DB2 logging : 1 #Be aware of tempdir setting.If client_browser and server_apache on same machine, sharing tmp-dir , problems 'Permission denied' if server tries to write temp-file wich already exists as client-owned -tempdir : /tmp/ledgersmb2 +tempdir : test # This is the logical CSS directory. I.e. it is what comes before the # ledgersmb.css in the url. Example might be /my_css_dir/ or