]>
git.r.bdr.sh - rbdr/forum/blob - src/stores/actions.test.js
1 import { enableTopicActions
, disableTopicActions
, topicActions
} from './actions';
3 describe('Topic actions and state', () => {
5 test('There should be no topic actions by default', () => {
7 topicActions
.subscribe((actions
) => {
9 expect(actions
).toBe(undefined);
13 test('enableTopicActions should set the topic id', () => {
15 enableTopicActions('free_hat');
16 topicActions
.subscribe((actions
) => {
18 expect(actions
).toEqual({
24 test('disableTopicActions should unset the topic id', () => {
26 disableTopicActions();
27 topicActions
.subscribe((actions
) => {
29 expect(actions
).toEqual(undefined);