test directive function binding to controller