Commit graph

973 commits

Author SHA1 Message Date
Colin Kuskie
0a1974ba4c forward porting Event dateSpan display fix and Event.t test 2007-11-28 04:47:30 +00:00
Colin Kuskie
92c3652406 Adding previously forgotten testing collateral 2007-11-28 04:35:01 +00:00
Colin Kuskie
8b84ae3e76 Up coverage of addGroups to 100%.
Change tabs to spaces in group diagrams.
Optimize the addGroups membership check so the expensive getGroupsIn
doesn't have to take place.
Add a label to the foreach.
2007-11-26 05:13:32 +00:00
Colin Kuskie
1b3d7f0c2b Refactor out the copied code to resize images based on the max file
size from the Admin Settings and create a new method in
Storage::Image.
Build a test to verify that it works correctly.
2007-11-24 05:30:15 +00:00
Colin Kuskie
41a8524daf remove mocking, since we new use PseudoRequest 2007-11-22 20:52:26 +00:00
Colin Kuskie
256b52a0d7 Final state and status fixes.
In these three files, any check for status=archived was removed, since
in each case it is possible that the Asset may want to be viewable
when it is archived, like Files, Posts, etc.
Updated Session/Url.t to remove tests for status=archived.
2007-11-22 18:46:17 +00:00
Graham Knop
865c1d315b merging 7.4 changes 2007-11-22 06:09:27 +00:00
Colin Kuskie
afb67294b8 more coverage tests for getDescendantCount, checking state and status 2007-11-21 18:04:41 +00:00
Colin Kuskie
185a582ef9 State and status fix for AssetLineage->getDescendantCount, and tests to
double check it.
2007-11-21 03:43:20 +00:00
Colin Kuskie
80333b1141 add more tests to cover AssetLineage->getChildCount. Optimize the new SQL query in getChildCount 2007-11-20 21:15:06 +00:00
Colin Kuskie
0799d70428 Fix for AssetLineage's getChildCount. It did not consider the
asset's status, only the state.  Change the SQL query to always
look at status, and consider state based on the options passed
to the method.
Add two quick tests to test that.  More to follow.
2007-11-20 04:46:45 +00:00
Colin Kuskie
d0624b7cf9 no sense looking in the Help and i18n for POD 2007-11-19 04:52:42 +00:00
Colin Kuskie
d566d0db8c add a test for makeArrayTabSafe and add comments to WebGUI::Utility 2007-11-16 05:16:44 +00:00
Colin Kuskie
b07956fa06 forward port of branch work with Utility.pm and isInSubnet 2007-11-16 04:36:08 +00:00
Colin Kuskie
fd8cff2b8f coverage tests for getFileIconUrl for WebGUI::Storage.pm 2007-11-12 20:58:21 +00:00
Colin Kuskie
484bc40569 leave notes as to future tests that need to be written for getBackToSiteURL 2007-11-12 05:20:52 +00:00
Colin Kuskie
dac78e161c Coverage tests for getBackToSiteURL brings Session/Url coverage
up to 100%.
2007-11-12 05:18:05 +00:00
Colin Kuskie
1cf78f5321 Finish up the file upload handling by PseudoRequest. If you
call $pseudoRequest->uploadFiles with a list of filenames, it will populate
the upload method with upload objects, so that Storage->getFileFromFormPost
will have an object with all the right methods.
t/Storage.t tests this incidently.  It occurs to me that we need tests
for our PseudoRequest module, and it needs POD, and it should probably
be rewritten using Class::InsideOut for good form.
2007-11-10 00:47:17 +00:00
Colin Kuskie
4de53b2de9 enable testing of $session->request->uploads through WebGUI::PseudoRequest. Now we need a good utility method for sending a list of files to a sub and having it return a list of filehandles to those files 2007-11-10 00:02:44 +00:00
Colin Kuskie
175304e915 always, always cleanup after myself in tests. sigh. 2007-11-09 22:43:19 +00:00
Colin Kuskie
57ff4405a6 add a prototype fix for not having InnoDB tables causing test errors 2007-11-09 22:35:58 +00:00
Colin Kuskie
f3b7b1bf8e Start adding coverage to the getBackToSiteURL method.
Remove the old commented out MockObject request code.  It's PseudoRequest or bust.
WGBP indent some of the Session/Url methods.
2007-11-09 21:23:00 +00:00
Colin Kuskie
0c2f9f5ec7 fix bad import of help template variables. Loops are now handled correctly. Added a test with supporting collateral to make sure this does not happen again 2007-11-08 05:34:48 +00:00
Chris Nehren
9db0430032 Fix the groupToEditPost field defaulting to the groupIdEdit field. Make sure
that the added collab system in the test has a parent asset as well, to ensure
that the inheritance works properly.
2007-11-07 22:29:21 +00:00
Chris Nehren
e20e6061f2 Don't delete the groups used in the Post test, they're needed. May want to make
mock groups in the future. Also clean up some commented out things from
Collaboration.t.
2007-11-06 23:06:09 +00:00
Chris Nehren
0d689afa4c Add the groupToEditPost field to the Collaboration system. This allows users
to specify a group of users that will always be able to do edits on posts,
regardless of whether they own those posts and independent of the editTimeout
field.
2007-11-06 22:58:22 +00:00
Chris Nehren
a7c0ff0dec Fix backwards compatability with existing code. Update the tests accordingly. 2007-11-05 20:10:42 +00:00
Chris Nehren
8688604ea4 Lots of fixes.
1. Restore original getJsonStatus functionality of returning data for just one
site, if sitename is passed.
2. Add a few comments to Spectre::Workflow::getJsonStatus to help explain what's
going on, and also add some whitespace to separate the code into logical pieces.
3. Add tests for this functionality, doubling the number of tests for
getJsonStauts to 20.
4. Per Colin's suggestion, use isa_ok rather than cmp_ok(ref ... , eq 'TYPE',
'...').
5. Fix broken indentation in a for loop.
6. Change for loops to foreach to be consistent with the rest of WebGUI.
2007-11-05 16:56:09 +00:00
Colin Kuskie
14e907d589 begin converting Session/Url.t to PseudoRequest 2007-11-02 23:38:45 +00:00
Chris Nehren
dd53243b08 Fixups for the tests. I moved the nested key checking into a TODO block. I'm
not sure how to handle them, as they may / may not exist in the %output hash.
Sometimes they'll pass, sometimes they won't, depending upon the time you run
it and the status of Spectre overall.
2007-11-02 19:12:16 +00:00
Chris Nehren
3e2bad5cb4 Work towards having Spectre::Workflow::getJsonStatus return information about
all sites, needed for munging workflow monitoring into wremonitor.pl.
2007-11-02 18:08:20 +00:00
Colin Kuskie
45eb45fa3e fix a session bug where, when using noFuss, user session scratch was not cleaned up 2007-11-02 17:50:19 +00:00
Colin Kuskie
980ff3e972 add plan for testing. Fill in with code later 2007-11-02 04:45:10 +00:00
Colin Kuskie
2c232773e4 add a test stub for DeleteExpiredSessions. To be filled in soon :) 2007-11-02 04:31:47 +00:00
Colin Kuskie
5263e69c85 var->end already does a scratch->deleteAll 2007-11-02 04:15:57 +00:00
Colin Kuskie
0fa154d84f Add a missing use line in Session/Privilege.pm.
Try to completely clean up all session related stuff from each test.
2007-11-02 03:57:00 +00:00
Colin Kuskie
397783f15d final coverage tests to bring User.pm up to 100% 2007-10-31 21:15:49 +00:00
Colin Kuskie
17441c13c2 Fixed broken friends method caching. The cache was never populated, so it
would fail every time.
Added a missing DESTROY method to Group.pm.  That way it won't puke when trying
to call an undefined method when the User object is cleaned up.
Added coverage tests for friends method in User.pm
2007-10-31 21:00:54 +00:00
Doug Bell
2570980fa5 makeShortcut done, EXIF done 2007-10-30 21:04:41 +00:00
Colin Kuskie
2165538936 coverage tests for identifier method 2007-10-29 23:21:43 +00:00
Doug Bell
673faf9be6 added Image::ExifTool to WebGUI. fixed upgrade script properlike 2007-10-29 22:44:35 +00:00
Colin Kuskie
4519ecb261 coverage test for the case of an un-cached profile field fetch in User.t 2007-10-29 22:38:36 +00:00
Colin Kuskie
17be7789cc fix a stupid typo that I put into i18n/help.t 2007-10-26 03:02:08 +00:00
Colin Kuskie
b8a4033036 Add more coverage tests for methods added to User.pm
for Friends.
Fix a bug in the isOnline method, which was looking sessions
exactly 600 seconds old.
2007-10-26 02:54:47 +00:00
Doug Bell
7e12c6c2f0 merged with SVN to get friends stuff 2007-10-26 00:50:05 +00:00
Doug Bell
32b27d0954 more tests, started Photo development, changed some naming 2007-10-25 06:20:20 +00:00
Colin Kuskie
3955b11149 make sure that no files are accidently skipped, and emit comments via diag, not warn 2007-10-24 22:34:49 +00:00
Colin Kuskie
9ac39f6f9d setHelp.t is not needed since all help icons point to the wiki 2007-10-24 04:24:35 +00:00
Doug Bell
2d165c862e Added WebGUI::Test::Maker 2007-10-24 04:12:33 +00:00
Colin Kuskie
696e2378d7 don't need no stinking File::Find 2007-10-24 04:05:59 +00:00