[MIE-1172] Increase test coverage for several files

This changeset add new unit tests for files in:

scripts/models
scripts/modules
scripts/views

JIRA ticket: https://jira.nationalgeographic.com/browse/MIE-1172