Added tests to controller to test promises