Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Commit

Permalink
fix(tests): Fix preferredLanguage tests
Browse files Browse the repository at this point in the history
* change description of tests to represent a state of the module during
the test
* fix the language to try to set in runtime (it must be different from
the current language)
  • Loading branch information
DWand committed May 8, 2013
1 parent f1b5084 commit 73efcfc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/unit/translateServiceSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,16 +249,16 @@ describe('ngTranslate', function () {
});
});

it('should allow to change preferred language', function() {
it('should allow to change preferred language during config', function() {
inject(function($translate){
expect($translate.preferredLanguage()).toEqual('de_DE');
});
});

it('shouldn\'t allow to change preferred language', function() {
it('shouldn\'t allow to change preferred language during runtime', function() {
inject(function($translate){
var prevLang = $translate.preferredLanguage();
$translate.preferredLanguage('de_DE');
$translate.preferredLanguage(prevLang == 'de_DE' ? 'en_EN' : 'de_DE');
expect($translate.preferredLanguage()).toBe(prevLang);
});
});
Expand Down

0 comments on commit 73efcfc

Please sign in to comment.