added controller tests for posts controller