Code Testing
I've never really written any tests, but I probably should just to learn ya know.
Stuff that would probably need testing:
-
Generating a filename (is it unique each time?) -
Generating a adminkey (is it unique each time?) -
Adding a file into the DB (does it work?, is the data correct?) -
Updating a file thats been viewed (does it work?, has it only added 1 to the viewcount?, has it updated accesstime?) -
Marking a file as deleted (has the file /actually/ been marked as deleted?) -
Actually uploading a file (with file extension) -
Actually uploading a file (without an extension) -
Actually deleting a file (was it deleted?, was anything /else/ deleted?) -
When deleting files, are they deleted? -
When deleting files, are views still counted? -
are templates being rendered correctly (in every circumstance?)
There's VERY likely other stuff, is it even possible to test /literally/ everything in the program?