Cleaned up whitespaces
Fixed issue with draft post unpublishable.

And added the relevant test