This commit is contained in:
pionnegru
2020-01-07 20:38:35 +02:00
parent 673e1f4d75
commit ea6eb8b8fc
5 changed files with 429 additions and 2 deletions

View File

@@ -439,4 +439,40 @@ describe('app.evaluators', () => {
expect(app.isShared(context)).toBe(true);
});
});
describe('canShowLanguagePicker', () => {
it('should return true when property is true', () => {
const context: any = {
languagePicker: true
};
expect(app.canShowLanguagePicker(context)).toBe(true);
});
it('should return false when property is false', () => {
const context: any = {
languagePicker: false
};
expect(app.canShowLanguagePicker(context)).toBe(false);
});
});
describe('canShowLogout', () => {
it('should return false when `withCredentials` property is true', () => {
const context: any = {
withCredentials: true
};
expect(app.canShowLogout(context)).toBe(false);
});
it('should return true when `withCredentials` property is false', () => {
const context: any = {
withCredentials: false
};
expect(app.canShowLanguagePicker(context)).toBe(true);
});
});
});