Modified unit test for SearchCtrl