describe('Unit: resizeImage filter', function () {
    beforeEach(module('placesWidgetFilters'));
    var filter;
    beforeEach(inject(function (_$filter_) {
        filter = _$filter_;
    }));

    it('it should pass if "resizeImage" filter returns resized image url', function () {
        var result;
        result = filter('resizeImage')('https://imagelibserver.s3.amazonaws.com/25935164-2add-11e5-9d04-02f7ca55c361/950a50c0-400a-11e5-9af5-3f5e0d725ccb.jpg', 88, 124, 'resize');
        expect(result).toEqual("http://s7obnu.cloudimage.io/s/resizenp/88x124/https://imagelibserver.s3.amazonaws.com/25935164-2add-11e5-9d04-02f7ca55c361/950a50c0-400a-11e5-9af5-3f5e0d725ccb.jpg");
    });

    it('it should give a default image even if parameter is blank', function () {
        var result;
        result = filter('resizeImage')('', 88, 124, 'resize');
        expect(result).toEqual("http://s7obnu.cloudimage.io/s/resizenp/88x124/");
    });
});
describe('Unit: cropImage filter', function () {
    beforeEach(module('placesWidgetFilters'));
    var filter;
    beforeEach(inject(function (_$filter_) {
        filter = _$filter_;
    }));

    it('it should pass if "cropImage" filter returns cropped image url', function () {
        var result;
        result = filter('cropImage')('https://www.facebook.com/photo.php?fbid=1008284442533844&set=a.359021657460129.98766.100000568920267&type=1&theater', 88, 124);
        expect(result).toEqual("http://s7obnu.cloudimage.io/s/crop/88x124/https://www.facebook.com/photo.php?fbid=1008284442533844&set=a.359021657460129.98766.100000568920267&type=1&theater");
    });

    it('it should give a default image even if parameter is blank', function () {
        var result;
        result = filter('cropImage')('', 88, 124);
        expect(result).toEqual("http://s7obnu.cloudimage.io/s/crop/88x124/");
    });
});

describe('Unit: safeHtml filter', function () {
    beforeEach(module('placesWidgetFilters'));
    var filter,$sce,$scope;
    beforeEach(inject(function (_$rootScope_,_$filter_,_$sce_) {
        filter = _$filter_;
        $sce=_$sce_;

        $scope=_$rootScope_;
    }));

    it('safeHtml filter should returns an empty string if html value not provided', function () {
        var result;
        result = filter('safeHtml')(null);
        expect(result).toEqual('');
    });
    it('safeHtml filter should returns an empty string if html value provided', function () {
        var result;
        result = filter('safeHtml')("<p>&nbsp;<br>Sandeep kumar</p>");
        expect(typeof result).toEqual('object');
    });
});

@@ -2576,20 +2576,535 @@
 ject');%0A    %7D);%0A%7D);%0A
+%0Adescribe('Unit: unique filter', function () %7B%0A    beforeEach(module('placesWidgetFilters'));%0A    var filter,$sce,$scope;%0A    beforeEach(inject(function (_$rootScope_,_$filter_,_$sce_) %7B%0A        filter = _$filter_;%0A        $sce=_$sce_;%0A%0A        $scope=_$rootScope_;%0A    %7D));%0A%0A    it('unique filter should returns an empty string if html value not provided', function () %7B%0A        var result;%0A        result = filter('unique')(%5B%7B'id':'id1'%7D,%7B'id':'id2'%7D%5D,'id');%0A        expect(result.length).toEqual(2);%0A    %7D);%0A%7D);%0A

test cases added for filter.js in widget section