Commit graph

97 commits

Author SHA1 Message Date
Colin Kuskie
14e907d589 begin converting Session/Url.t to PseudoRequest 2007-11-02 23:38:45 +00:00
Graham Knop
db59a2eb7a Some test fixes. 2007-08-15 19:14:08 +00:00
Colin Kuskie
83310ba311 update copyright on tests 2007-07-07 03:56:44 +00:00
Colin Kuskie
6dd91ea8f4 fix a test that leaks a user and casues t/Macro/SQL.t to fail if they are called in the correct order 2007-05-30 21:43:25 +00:00
Colin Kuskie
7f034ba090 basic test for toHex 2007-05-07 04:44:39 +00:00
Colin Kuskie
38060cc0cb add another privilege method for handling locked assets 2007-04-27 22:20:27 +00:00
Colin Kuskie
025a66e30d Coverage is 100/98/63.
Missing coverage is checking for leaving off the epoch argument
and getting the default of time(), and some kind of Devel::Cover
issue where it says that time() could return 0.
2007-04-11 03:05:43 +00:00
Colin Kuskie
b14c3983a9 more coverage tests, branch coverage is at 98% 2007-04-10 22:45:32 +00:00
Colin Kuskie
76bf1b2ad5 testing for DateTime methods for interval translation and date math. Reformatted some of Session/DateTime for WGBP 2007-04-10 04:51:48 +00:00
Colin Kuskie
d051a1960e cover the remaining few subroutines. 100% sub coverage for Session::DateTime 2007-04-09 23:47:47 +00:00
Colin Kuskie
4cc810faf3 Added tests for mailToEpoch.
Removed the default setting for mailToEpoch that would have assigned
the epoch to the mail field and automatically caused the method
to fail, returning undef.
2007-04-09 18:01:26 +00:00
Colin Kuskie
b76351fa83 expanding the DateTime test suite, missing three methods and lots of branch/condition coverage 2007-04-08 05:06:15 +00:00
Colin Kuskie
f113d0a729 increase Privilege coverage to 100% 2007-04-07 19:53:33 +00:00
Colin Kuskie
c6bde7eed9 By default, all Log::Log4Perl calls are mocked so that they can
be intercepted and tested.
Reworked Session/ErrorHandler.t to take account of this.
Updated Stow test coverage to 100%.
2007-04-06 22:50:53 +00:00
Colin Kuskie
97e7621b8a rewrite Http.t tests to return coverage to its original status before the Http.pm rewrite. The only way to increase it from here is to mock the Apache cookie module 2007-04-06 05:00:00 +00:00
Colin Kuskie
17efbe2186 begin fixing the Http tests 2007-04-03 04:21:04 +00:00
Colin Kuskie
c3b3706e19 repair Http test so that it passes. The entire test needs to be reworked as there are now tons of redundant tests 2007-03-10 04:49:48 +00:00
Colin Kuskie
f9aff0cb98 document test that needs to be written for 100% coverage of Style.pm 2007-03-09 22:19:24 +00:00
Colin Kuskie
cee8757c5c adjust style headers for new caching system 2007-03-09 18:30:47 +00:00
Colin Kuskie
91f0b5205c adjust test for new noCache syntax 2007-03-09 17:27:43 +00:00
Colin Kuskie
84716b87ed set explicit check for html,head and body tags to useEmptyStyle to keep an eye on the template 2007-02-28 23:17:20 +00:00
Colin Kuskie
709939f5a1 try to make delta time tests more robust by moving the time variable assignment 2007-01-25 19:06:11 +00:00
Colin Kuskie
c95fefec81 adding test for headBlock processing in style templates. They should only show up once. 2007-01-07 22:42:13 +00:00
Colin Kuskie
850abf9b6d setup code for showDebug test 2006-11-28 16:58:21 +00:00
Colin Kuskie
2843dd195b update ErrorHandler test to work from either . or sbin 2006-11-22 21:59:07 +00:00
Colin Kuskie
a0d2326f9c Found and fixed a bug in ErrorHandler, canShowPerformanceIndicators.
It didn't work with CIDR format IP addresses.  I cannabilized the
code from canShowDebug and refactored it into its own method,
canShowBasedOnIP.  Both canShowDebug and canShowPerformanceIndicators call this.
Updated the docs for the debugIp setting to note that it's used for both
showDebug and showPerformanceIndicators.
Added about 20 more tests to ErrorHandler.t.  Only the two hard methods are
left, fatal (which closes the session at the end) and showDebug, which is
validating a ton of output.
2006-11-21 03:50:15 +00:00
Colin Kuskie
9c6f2c8b09 tests for audit, security which wrap info and warn 2006-11-20 05:28:53 +00:00
Colin Kuskie
648d7d0008 beginning of tests for ErrorHandler 2006-11-20 04:58:31 +00:00
Colin Kuskie
204046d283 document object mocking 2006-11-09 17:50:59 +00:00
Colin Kuskie
ce617607a8 Update Style test to check for new return value.
Fix broken labels in CS Help and hover help.
2006-11-08 23:28:55 +00:00
Colin Kuskie
7b1109fb83 update test to handle change in Scratch delete return value 2006-11-07 17:25:00 +00:00
Colin Kuskie
c3a2e71cd1 Mock the Session::Http->getCookies method so that neither it nor
setCookie will be called.
2006-11-06 00:50:34 +00:00
Colin Kuskie
568a02a6af This is as good as it's going to get. In order to push
the coverage up any higher, we'd have to reverse engineer
the Apache::Cookie module, figure out what it's doing to
the request.
2006-11-02 00:08:12 +00:00
Colin Kuskie
75f159f71b A whole batch of Http test, and a pseudo Request test module to help.
Added accessors to Session/Http.pm, and wrote tests to back them all up.
2006-10-30 18:09:25 +00:00
Colin Kuskie
88ef9a412e bunch of basic HTTP tests 2006-10-22 02:02:29 +00:00
Colin Kuskie
ab502e84d8 make test more robust to handle multiple toolbars 2006-10-21 16:44:51 +00:00
Colin Kuskie
e434fb700c Remove crufty code from HTMLForm that was never used.
More tests for Session/Icon.pm.  Due to the way the code is written,
this test will not test 100% of the code.  Untestable conditions include
not being able to find the toolbar directory in getToolbarOptions, and
all code that sets a default pageUrl in any icon-specific method.
2006-10-21 02:12:34 +00:00
Colin Kuskie
d55789fce3 refactored test to make pick up tests easier 2006-10-20 22:56:30 +00:00
Colin Kuskie
6ad527c4a9 Bulk tests for Session::Icon
Documented the disabled flag for moveDown and moveUp.  Only the EMS uses this in
the core as far as I can tell.
Optimized out 1 profile call in getBaseURL
2006-10-20 21:19:08 +00:00
Colin Kuskie
052d0ddb15 Os tests covering all possible, valid operating systems. Also has 100% test coverage 2006-10-19 17:49:51 +00:00
Colin Kuskie
b7ff72d27b tests to add 100% coverage to Privilege 2006-10-19 16:49:19 +00:00
Colin Kuskie
eef214ebb6 beginning of Privilege test 2006-10-18 03:32:40 +00:00
Colin Kuskie
276a2aa99d update test to work with getStatusDescription 2006-10-16 16:09:15 +00:00
Colin Kuskie
ca7110249f Extend Session::Http::getStatus so that is will also return the
description when called in list context.
Build tests to verify that behavior, and the default settings
for code and description.
2006-10-15 05:23:32 +00:00
Colin Kuskie
eadb9ada36 Implemented the last few tests to give Session::Style 100% coverage.
There are still a few functional tests that need to be written, they're
codified as TODOs.

In Session/Style.pm, in all methods that have a send immediate option
(when sent=1), they no longer send and cache.  This prevents duplicate
heag tags from being generated if generateAdditionalHeadTags was
ever called twice.
2006-10-12 22:43:33 +00:00
Colin Kuskie
45627b37ed Full test for Output.t using tied variables as filehandles.
Test requires perl 5.8 and up since it uses PerlIO.
Test provides 100% coverage of Session::Output.pm
2006-10-12 17:32:24 +00:00
Colin Kuskie
514c2263fc Added tests to cover userStyle.
fixed a bug in userStyle where it would not process data that was false.
process will do this, so I made userStyle do it as well by adding
in a definedness check on $output.
2006-10-12 04:53:43 +00:00
Colin Kuskie
01a09cbea9 Add tests for printableStyleTemplateId.
Found a fixed an infinite loop in WebGUI::Style::process

If an asset was requested to be printed who does not have a
printableStyleTemplateId then process would recurse back up the
lineage until it does find an asset with a printableStyleTemplateId.
Eventually, if none is found, it will find the Asset Root, whose
parent is itself, and it will loop forever.

I added code to jump out of the loop if it recurses back to the
assetRoot.
2006-10-12 04:06:13 +00:00
Colin Kuskie
e876e77b18 add a tests to plug a coverage holes in default subroutine arguments 2006-10-11 05:04:44 +00:00
Colin Kuskie
a86c34df84 Added 5 more tests for Style's process method, checking for meta tags
for default processing and for meta tags when cache busting is enabled.

Fixed a bug where the default meta tag Generator did not contain the
WebGUI version.

Added lots of POD to the Style module detailing how meta tags are
handled in various cases.
2006-10-11 04:15:21 +00:00