Added conditional checks in controller for better testing
Added angularjs tests for CustomerController