Skip to content

Commit

Permalink
test: add scenario for create chapter 🐌
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyar committed Sep 4, 2022
1 parent e102519 commit 6f419be
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/document-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,15 @@ describe("Test base flow", async function () {
response = await dao.methods.show_draft({}).call();
expect(response.out).to.be.equal("\t");
});

it("Create chapter", async function () {
let response = await dao.methods.show_all({}).call();
expect(response.out).to.be.equal("");
await dao.methods.add_line({ line: "foo" }).sendExternal({ publicKey: signer.publicKey });
await dao.methods.add_line({ line: "bar" }).sendExternal({ publicKey: signer.publicKey });
await dao.methods.add_chapter({ n: 0 }).sendExternal({ publicKey: signer.publicKey });
response = await dao.methods.show_all({}).call();
expect(response.out).to.be.equal("\n\tChapter 0\n\tfoo\nbar\n");
});
});
});

0 comments on commit 6f419be

Please sign in to comment.