forked from mattermost/mattermost-webapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rhs.test.js
32 lines (26 loc) · 1015 Bytes
/
rhs.test.js
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
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import assert from 'assert';
import * as Selectors from 'selectors/rhs.jsx';
describe('Selectors.Rhs', () => {
describe('should return the open state of the sidebar', () => {
[true, false].forEach((expected) => {
it(`when open is ${expected}`, () => {
const state = {views: {rhs: {
isSidebarOpen: expected,
}}};
assert.deepEqual(expected, Selectors.getIsRhsOpen(state));
});
});
});
describe('should return the open state of the sidebar menu', () => {
[true, false].forEach((expected) => {
it(`when open is ${expected}`, () => {
const state = {views: {rhs: {
isMenuOpen: expected,
}}};
assert.deepEqual(expected, Selectors.getIsRhsMenuOpen(state));
});
});
});
});