Create posts controller spec
Test handleError function