blob: 9285013abc0521b8489ba603515235ace71a68e7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
/*global Pixelated */
describeComponent('page/logout', function () {
'use strict';
describe('logout link', function () {
var features;
beforeEach(function() {
features = require('features');
});
it('should provide logout link if logout is enabled', function () {
spyOn(features, 'isLogoutEnabled').and.returnValue(true);
this.setupComponent('<div id="logout"></div>', {});
var logout_link = this.component.$node.find('a')[0];
expect(logout_link).toExist();
expect(logout_link.href).toMatch('test/logout/url');
});
it('should not provide logout link if disabled', function() {
spyOn(features, 'isLogoutEnabled').and.returnValue(false);
this.setupComponent('<div id="logout"></div>', {});
var logout_link = this.component.$node.find('a')[0];
expect(logout_link).not.toExist();
});
});
});
|