Add Code Climate test coverage.
Refactor more pdf model specs. Add spec for pdf controller.