aboutsummaryrefslogtreecommitdiff
path: root/test/content/operators/impls/DisableAddonOperator.test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/content/operators/impls/DisableAddonOperator.test.ts')
-rw-r--r--test/content/operators/impls/DisableAddonOperator.test.ts19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/content/operators/impls/DisableAddonOperator.test.ts b/test/content/operators/impls/DisableAddonOperator.test.ts
new file mode 100644
index 0000000..358ae44
--- /dev/null
+++ b/test/content/operators/impls/DisableAddonOperator.test.ts
@@ -0,0 +1,19 @@
+import { expect } from "chai";
+import DisableAddonOperator from "../../../../src/content/operators/impls/DisableAddonOperator";
+import MockAddonIndicatorClient from "../../mock/MockAddonIndicatorClient";
+import MockAddonEnabledRepository from "../../mock/MockAddonEnabledRepository";
+
+describe("DisableAddonOperator", () => {
+ describe("#run", () => {
+ it("disables addon", async () => {
+ const client = new MockAddonIndicatorClient(true);
+ const repository = new MockAddonEnabledRepository(true);
+ const sut = new DisableAddonOperator(client, repository);
+
+ await sut.run();
+
+ expect(client.enabled).to.be.false;
+ expect(repository.enabled).to.be.false;
+ });
+ });
+});