Projects

One thought on “Projects

  1. function getSites() {
    generationLogService.GetAllSites($scope.selectedFilterType).then(function (data) {
    $scope.siteList = data.data
    }, function (error) {
    toaster.pop(‘error’, ‘Error!’, error.data.Response[0].Description || ‘Oops! Some error occurred while uploading document.’);
    });
    };

    how to write jasmine unit test for my controller code when there is no $q in my controller …

    my service file is..
    var URL = configFactory.getAppUrl();
    var factory = {};
    factory.GetAllSites = function (type) {
    if (type == undefined)
    type = ”;
    return $http(
    {
    method: ‘Get’,
    url: URL + ‘/GetSites’,
    params: { type: type }
    });
    };

    factory.GetGenerationLog = function (filterParameters) {
    return $http(
    {
    method: ‘Post’,
    url: URL + ‘/GetDataLoggerReport’,
    data: filterParameters,
    headers: { ‘Content-Type’: ‘application/json’ },
    });

    };

    return factory;

Leave a Reply

Your email address will not be published. Required fields are marked *


*