An employee who tweeted her boss was a racist got fired; that firing was (probably) legally justified.
As between an employer and employer there are two central obligations:
• trust and confidence; and
• good faith.
If something comes up at work – say a racist comment by your boss -- you have an obligation to try to resolve it directly with your employer. Going online and complaining is not acting in good faith. Even if what you say is true that may not be enough to save your job.
The obligations of trust and confidence (probably) gives an employer grounds to dismiss if there are derogatory online postings.
Think before you post!