added some js tests for post controller