Yes, that would be objectionable, and probably not even legal, unless your boss was a member of a protected class and it could be shown that what you were doing was a hate action against the class and not the individual.
In the US, employers can fire employees for violating company policies (which presumably would forbid spitting on coworkers) even in cases where protected classes are not a factor. Is that the thing you think is objectionable, and maybe illegal?
You think it's literally illegal to fire someone for spitting on their boss?
The OP talked about getting fired "with no hearing". The days of bosses being absolute rulers that can just fire people instantly with a "You're fired!" isn't really true these days, even in places like the US with limited worker protection. Typically, hearings with HR are scheduled to see what and why things happened. This can result in the worker being fired, of course, but companies fear wrongful dismissal law suits that arise from bosses acting directly.
Okay, so how is that different from the campus sexual assault tribunals that everyone in this thread is objecting to?