discourse/discourse — pull request #1971 by velesin (2014-02-18 16:57:42+00:00)
Title: Refactors PostsController and adds unit tests.

removes some duplication (minimally reduces Code Climate complexity) and adds missing unit tests to support the refactoring