Improved tests for posts controller