add tests for posts controller