Sha256: dc4602d61899a20c4bcd4be00c8d11a0057a4497d52c005b92912ea9edcb054d

Contents?: true

Size: 1.1 KB

Versions: 30

Compression:

Stored size: 1.1 KB

Contents

/**
 * Copyright 2014 Red Hat, Inc.
 *
 * This software is licensed to you under the GNU General Public
 * License as published by the Free Software Foundation; either version
 * 2 of the License (GPLv2) or (at your option) any later version.
 * There is NO WARRANTY for this software, express or implied,
 * including the implied warranties of MERCHANTABILITY,
 * NON-INFRINGEMENT, or FITNESS FOR A PARTICULAR PURPOSE. You should
 * have received a copy of GPLv2 along with this software; if not, see
 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
 **/

describe('Service: translate', function() {
    var translate, gettextCatalog;

    beforeEach(module('Bastion.i18n'));

    beforeEach(inject(function(_translate_, _gettextCatalog_) {
        translate = _translate_;
        gettextCatalog = _gettextCatalog_;
    }));

    it('passes through to the gettextCatalog.getString', function() {
        var string = 'lalala';
        spyOn(gettextCatalog, 'getString').andReturn(string);
        expect(translate(string)).toBe(string);
        expect(gettextCatalog.getString).toHaveBeenCalledWith(string);
    });
});

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
bastion-0.1.9 test/i18n/translate.service.test.js
bastion-0.1.8 test/i18n/translate.service.test.js
bastion-0.1.7 test/i18n/translate.service.test.js
bastion-0.1.6 test/i18n/translate.service.test.js
bastion-0.1.5 test/i18n/translate.service.test.js
bastion-0.1.4 test/i18n/translate.service.test.js
bastion-0.1.3 test/i18n/translate.service.test.js
bastion-0.1.2 test/i18n/translate.service.test.js
bastion-0.1.1 test/i18n/translate.service.test.js
bastion-0.1.0 test/i18n/translate.service.test.js