Judge dismisses former Cathedral teacher claim he was fired over same-sex marriage