added macros and shared examples to controller tests