Centralize tests for media helpers
Refactor unit tests for media helpers a bit
Add some more unit tests for media helpers
Remove useless variable assignments
Remove unnecessary attachment deletion
Add some more unit tests for media helpers
Modify the names of some test methods