我必须为以下代码编写测试用例。有人可以建议如何编写以下代码的测试用例吗?
$scope.forgotPassword = function (event) {
var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) &&
$scope.customFullscreen;
$mdDialog.show({
controller: ForgotPasswordController,
templateUrl: 'views/forgot_password.html',
parent: angular.element(document.body),
targetEvent: event,
// locals:{tenant_id: $scope.tenant_id},
fullscreen: useFullScreen
})
.then(function(answer) {
// $scope.getAllTenants(0);
}, function() {
$scope.status = 'You cancelled the dialog.';
});
$scope.$watch(function() {
return $mdMedia('xs') || $mdMedia('sm');
}, function(wantsFullScreen) {
$scope.customFullscreen = (wantsFullScreen === true);
});
}