aboutsummaryrefslogtreecommitdiff
path: root/test/content/repositories/FollowKeyRepository.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/content/repositories/FollowKeyRepository.test.ts')
-rw-r--r--test/content/repositories/FollowKeyRepository.test.ts31
1 files changed, 31 insertions, 0 deletions
diff --git a/test/content/repositories/FollowKeyRepository.test.ts b/test/content/repositories/FollowKeyRepository.test.ts
new file mode 100644
index 0000000..eae58b9
--- /dev/null
+++ b/test/content/repositories/FollowKeyRepository.test.ts
@@ -0,0 +1,31 @@
+import FollowKeyRepository, { FollowKeyRepositoryImpl }
+ from '../../../src/content/repositories/FollowKeyRepository';
+import { expect } from 'chai';
+
+describe('FollowKeyRepositoryImpl', () => {
+ let sut: FollowKeyRepository;
+
+ before(() => {
+ sut = new FollowKeyRepositoryImpl();
+ });
+
+ describe('#getKeys()/#pushKey()/#popKey()', () => {
+ it('enqueues keys', () => {
+ expect(sut.getKeys()).to.be.empty;
+
+ sut.pushKey('a');
+ sut.pushKey('b');
+ sut.pushKey('c');
+ expect(sut.getKeys()).to.deep.equal(['a', 'b', 'c']);
+
+ sut.popKey();
+ expect(sut.getKeys()).to.deep.equal(['a', 'b']);
+
+ sut.clearKeys();
+ expect(sut.getKeys()).to.be.empty;
+ });
+ });
+});
+
+
+