Macro Tests: refactored all macro tests to remove a very evil hack
for inserting macros into the config. The new method is much cleaner and uses the Config API. Updated the docs for the RootTitle macro, both POD and online help.
This commit is contained in:
parent
cc61639232
commit
f1159269a0
32 changed files with 245 additions and 132 deletions
|
|
@ -23,9 +23,8 @@ use Test::More; # increment this value for each test you create
|
|||
|
||||
my $session = WebGUI::Test->session;
|
||||
|
||||
unless ($session->config->get('macros')->{'EditableToggle'}) {
|
||||
Macro_Config::insert_macro($session, 'EditableToggle', 'EditableToggle');
|
||||
}
|
||||
my @added_macros = ();
|
||||
push @added_macros, WebGUI::Macro_Config::enable_macro($session, 'EditableToggle', 'EditableToggle');
|
||||
|
||||
my $homeAsset = WebGUI::Asset->getDefault($session);
|
||||
$session->asset($homeAsset);
|
||||
|
|
@ -291,4 +290,8 @@ END { ##Clean-up after yourself, always
|
|||
foreach my $dude (@users) {
|
||||
$dude->delete if (defined $dude and ref $dude eq 'WebGUI::User');
|
||||
}
|
||||
foreach my $macro (@added_macros) {
|
||||
next unless $macro;
|
||||
$session->config->deleteFromHash("macros", $macro);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue