added tests for post model