Moved test from controller to helper.