Skip to content

Commit

Permalink
added getLocales() test
Browse files Browse the repository at this point in the history
  • Loading branch information
einfallstoll committed Apr 9, 2015
1 parent ea3f909 commit 051acad
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/i18n.api.js
Expand Up @@ -366,6 +366,20 @@ describe('Module API', function () {
i18n.getCatalog(req, 'oO').should.equal(false);
});
});
describe('i18nGetLocales', function () {
it('should return the locales', function () {
var returnedLocales = i18n.getLocales();
returnedLocales.sort();
var expectedLocales = ['en', 'de', 'en-GB'];
expectedLocales.sort();

returnedLocales.length.should.equal(expectedLocales.length);

for (var i = 0; i < returnedLocales.length; i++) {
returnedLocales[i].should.equal(expectedLocales[i]);
}
});
});
describe('i18nTranslate', function () {
beforeEach(function() {
i18n.setLocale('de');
Expand Down

0 comments on commit 051acad

Please sign in to comment.