aboutsummaryrefslogtreecommitdiff
path: root/test/content/repositories/FollowSlaveRepository.test.ts
blob: 52ed3fcc9184f8bd3f3eb60937e0a8804b5556db (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import FollowSlaveRepository, {
  FollowSlaveRepositoryImpl,
} from "../../../src/content/repositories/FollowSlaveRepository";

describe("FollowSlaveRepository", () => {
  let sut: FollowSlaveRepository;

  beforeEach(() => {
    sut = new FollowSlaveRepositoryImpl();
  });

  describe("#isFollowMode()/#enableFollowMode()/#disableFollowMode()", () => {
    it("gets, adds updates follow mode", () => {
      expect(sut.isFollowMode()).toBeFalsy;

      sut.enableFollowMode();
      expect(sut.isFollowMode()).toBeTruthy;

      sut.disableFollowMode();
      expect(sut.isFollowMode()).toBeFalsy;
    });
  });
});