Commit graph

474 commits

Author SHA1 Message Date
Colin Kuskie
febc052d97 add extra collateral for DateTime tests 2007-04-11 02:50:14 +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
f9958fa4eb upgrade test to work with newer use_ok 2007-04-07 02:33:21 +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
Doug Bell
991aac998a fix: t::WebGUI::PseudoRequest now works properly
add: Added some additional vars to Calendar Week view
fix: WebGUI::DateTime now handles MySQL strings more robustly
2007-03-20 17:27:30 +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
7818789002 update tests for new noCache syntax 2007-03-09 16:59:52 +00:00
Colin Kuskie
ec3eebda9b remove duplicate code in addUsers, add more tests to Group.t to cover 2007-03-07 00:16:22 +00:00
Colin Kuskie
b24bd78e8d Grrr. Id10t test writer 2007-03-06 23:45:44 +00:00
Colin Kuskie
563269e5f5 fix crufty dbSlave test and remove debugging output 2007-03-06 18:39:07 +00:00
Colin Kuskie
e17e1f7e4f coverage tests for Group.pm convenience methods 2007-03-04 06:22:57 +00:00
Colin Kuskie
81e1001d59 More coverage tests. With the exception of the deprecated identifier method, User.pm is 100% covered 2007-03-04 05:35:47 +00:00
Colin Kuskie
1412f023f1 Fixed a bug in WebGUI::User::profileField, where the check for whether or not
a profile field existed in the db always passed because it used quickArray in
scalar context.  Since quickArray always returns 1 element, this was always true
and it never returned undef like it was supposed to.

To fix this, I added a new method called quickScalar that returns the first column
from the row as a scalar.  It has a basic test in SQL.t.

Then there's the new test in User.t for coverage that exposed this problem, and
I also removed a whole slew of duplicate tests.
2007-03-04 04:18:59 +00:00
Colin Kuskie
1a278fed6c remove some old debug code and cover the caching of user profile fields on user creation 2007-03-04 03:40:25 +00:00
Colin Kuskie
ac6116b7a0 Added a dbSlave test to Session.t. It's kind of a hack as it sets up
a slave reference back to the original db from the config.
Bug fixes for the TrashClipboard workflow activity.  The dates were off,
since the interval returns an epoch, and the call to Asset->new didn't
have the session.
2007-03-02 16:51:49 +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
4469301092 Based on SVN history, put the behavior of the SQL back and fixed the POD and
the tests.
2007-02-25 06:20:54 +00:00
Colin Kuskie
5a379fe91e Add tests for urlExists and fix bugs in the method. It now handles
placeholders correctly and does exactly what the POD says, assetId
requires that the url be with that assetId, rather than not in that
assetId.
2007-02-25 06:18:15 +00:00
Colin Kuskie
70d7bb2513 Remove some dead code in Group.t
Add more tests for coverage in User.t
2007-02-25 05:57:54 +00:00
Colin Kuskie
128ab06bf6 Built a test for newByEmail and removed the TODO test. 2007-02-24 04:36:11 +00:00
Colin Kuskie
31139678ee Corner cases for User.pm coverage
Converted 2 more queries to use placeholders
2007-02-24 00:37:55 +00:00
Colin Kuskie
2a0eb20bc7 Tests for the canUseAdminMode method of User.pm
Uncovered and fixed a bug where $session->user instead of $self was used in canUseAdminMode
Added an explicit test in Config.pm to make sure that array refs can be passed to ->set.
2007-02-23 23:39:35 +00:00
Colin Kuskie
2803ae520c Ran coverage on User.t and found that we're missing two entire
methods, so I added TODO tests for them.  Overall coverage is low
as well.
Began converting User.pm to use placeholders.
2007-02-23 22:27:23 +00:00
Colin Kuskie
6683d27795 clean-up. High code coverage always makes me excited 2007-02-23 05:11:55 +00:00
Colin Kuskie
906775d505 AdSpace has 100% coverage, aside from some conditionals in the set method.
Found and fixed an off by 1 error in displayImpressions that allowed boughtImpressions+1
impressions to be displayed.
2007-02-23 04:59:06 +00:00
Colin Kuskie
47c55075f6 add a test for deactivating an ad by impressions 2007-02-22 06:11:13 +00:00
Colin Kuskie
5d0b0a3c80 more AdSpace tests 2007-02-21 00:11:42 +00:00
Colin Kuskie
d884856148 begin a sequence of tests to check Ad and AdSpace interactions, countClicks and getAds 2007-02-19 05:00:32 +00:00
Colin Kuskie
9666dadc82 This set of tests brings overall coverage close to 100% for the Ad module.
Remainnig conditionals in the set subroutine will be tested after 7.4
comes our and ->get can be modified to return the whole set of properties.
Fixed a bug in the Ad module where the priority could not be set to 0.
2007-02-19 04:01:24 +00:00
Colin Kuskie
b8bd315555 begin to add tests for Ad.pm coverage 2007-02-18 17:38:13 +00:00
Colin Kuskie
fd9e2ecd21 A bunch more Ad tests. Need to check the coverage to see if anything has been
missed.
Removed a duplicate alt attribute in the image ad.
2007-02-17 00:36:49 +00:00
Colin Kuskie
76585a1daa Added a new method to WebGUI::HTML called makeParameter safe. It will
encode commas and single quotes to make the output safe to embed inside
of a macro.
Added tests to verify that it works correctly.
Updated the c_companyName macro to use makeParameterSafe.
Added tests to verify that the changed macro works okay.
Updated the c_companyName documentation.
Added a blurb to the gotchas file to cover the change to the macro.
2007-02-13 23:42:53 +00:00
Colin Kuskie
52a3023b09 more Ad tests, testing for rendering text ads 2007-02-13 23:12:51 +00:00
Colin Kuskie
84198ceea0 More tests for AdSpace/Ad.pm, one of which found a bug with
handling Macros in Rich Media ads.  This was fixed.

Just the start of template docs for the Calendar.  Finishing the 
Calendar docs requires doing the Event docs.
2007-02-10 00:16:16 +00:00
Colin Kuskie
cae65be309 more tests for AdSpace/Ad.pm 2007-02-06 04:41:12 +00:00
Colin Kuskie
d1ede96e63 Make AdSpace->get provide a hash ref if none is supplied.
Add tests to improve test coverage and to verify defaults from the
DB and the code.
2007-02-05 04:10:15 +00:00
Colin Kuskie
c9726f7b4d New AdSpace tests, need to start looking at coverage.
Added some comments and fixed some POD in AdSpace.pm and Ad.pm
2007-02-05 01:01:20 +00:00
Colin Kuskie
870d9dbe46 more tests for AdSpace and added more POD to AdSpace.pm and Ad.pm 2007-02-04 04:12:19 +00:00
Colin Kuskie
ef07faa506 fix failing test for looking up dynamic lables 2007-02-02 17:51:15 +00:00
Doug Bell
af66fa585c Updated AssetExportHtml and tests. Now to re-order the export. 2007-02-01 16:57:05 +00:00