Skip to content

Commit

Permalink
add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
uidp committed Jun 12, 2024
1 parent fc55297 commit 4187310
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { columnBoardNodeFactory } from '@shared/testing';
import { ColumnBoardNode } from './column-board-node.entity';

describe(ColumnBoardNode.name, () => {
it('should be able to be published', () => {
const nodeEntity = columnBoardNodeFactory.build({ isVisible: false });

nodeEntity.publish();

expect(nodeEntity.isVisible).toBe(true);
});

it('should be able to be unpublished', () => {
const nodeEntity = columnBoardNodeFactory.build({ isVisible: true });

nodeEntity.unpublish();

expect(nodeEntity.isVisible).toBe(false);
});
});

0 comments on commit 4187310

Please sign in to comment.