2015-10-03 15:26:10 +00:00
|
|
|
import {STRING_ERROR_MSG, STRING_DOES_NOT_EXIST_MSG} from '../helpers/content.helper';
|
2016-03-01 14:49:25 +00:00
|
|
|
import translator from '../../common/script/content/translation';
|
2015-09-29 12:55:13 +00:00
|
|
|
|
|
|
|
|
describe('Translator', () => {
|
|
|
|
|
it('returns error message if string is not properly formatted', () => {
|
|
|
|
|
let improperlyFormattedString = translator('petName', {attr: 0})();
|
|
|
|
|
expect(improperlyFormattedString).to.eql(STRING_ERROR_MSG);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it('returns an error message if string does not exist', () => {
|
|
|
|
|
let stringDoesNotExist = translator('stringDoesNotExist')();
|
|
|
|
|
expect(stringDoesNotExist).to.match(STRING_DOES_NOT_EXIST_MSG);
|
|
|
|
|
});
|
|
|
|
|
});
|