Attachment / Attachment Spec


The verbs 'assign', 'generate', 'move', and 'delete' are all operations associated with Attachments.

This spec ensures that all of those operations perform their tasks correctly and to completion. 

For instance, when attachments are assigned or generated, we want to ensure that when the attachments are searched for, they are found as expected.

When attachments are moved, we want to ensure that the files have in fact been moved to the expected location, that the database references have been updated correctly, and that redundant items have been cleaned up.

When attachments are deleted, we want to ensure that both the file and the database reference to the file are, in fact, gone.

This spec tests all the above situations.


This spec verifies that the following Attachment methods return the expected results:
  • Attachments can be created without errors
  • Attachments can be searched for and retrieved without errors
  • Attachments can be transferred between file systems
  • Images can be resized
  • Attachments can be deleted without errors. Verifies that both the database reference and the attachment file are deleted.