Skip to content

Commit

Permalink
Updating tests for sysconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
einhverfr committed Sep 30, 2014
1 parent b7c5811 commit 729f862
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
24 changes: 24 additions & 0 deletions t/12-sysconfig.t
Original file line number Diff line number Diff line change
@@ -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';

2 changes: 1 addition & 1 deletion t/data/ledgersmb.conf
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 729f862

Please sign in to comment.