remove addPosts
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 33s Details

This commit is contained in:
Ladd Hoffman 2024-04-23 10:46:53 -05:00
parent c643f0d952
commit 1948e81733
2 changed files with 0 additions and 47 deletions

View File

@ -22,12 +22,6 @@ struct Post {
// TODO: timestamp
}
// struct PostParams {
// string contentId;
// Author[] authors;
// Citation[] citations;
// }
contract Forum is Reputation {
mapping(string => Post) public posts;
string[] public postIds;
@ -93,16 +87,6 @@ contract Forum is Reputation {
emit PostAdded(contentId);
}
// function addPosts(PostParams[] calldata postParams) external {
// for (uint i = 0; i < postParams.length; i++) {
// this.addPost(
// postParams[i].authors,
// postParams[i].contentId,
// postParams[i].citations
// );
// }
// }
function getPostAuthors(
string calldata postId
) external view returns (Author[] memory) {

View File

@ -63,37 +63,6 @@ describe('Forum', () => {
expect(postAuthors[0].authorAddress).to.equal(account1);
});
// it('should be able to add multiple posts', async () => {
// await expect(dao.addPost([{
// authors: [{ weightPPM: 100, authorAddress: account1 }],
// contentId: 'some-id',
// citations: [],
// }, {
// authors: [{ weightPPM: 100, authorAddress: account2 }],
// contentId: 'some-other-id',
// citations: [],
// },
// ]))
// .to.emit(dao, 'PostAdded').withArgs('some-id')
// .to.emit(dao, 'PostAdded').withArgs('some-other-id');
// let post = await dao.posts('some-id');
// expect(post.sender).to.equal(account1);
// expect(post.id).to.equal('some-id');
// let postAuthors = await dao.getPostAuthors('some-id');
// expect(postAuthors).to.have.length(1);
// expect(postAuthors[0].weightPPM).to.equal(1000000);
// expect(postAuthors[0].authorAddress).to.equal(account1);
// post = await dao.posts('some-other-id');
// expect(post.sender).to.equal(account2);
// expect(post.id).to.equal('some-other-id');
// postAuthors = await dao.getPostAuthors('some-other-id');
// expect(postAuthors).to.have.length(1);
// expect(postAuthors[0].weightPPM).to.equal(1000000);
// expect(postAuthors[0].authorAddress).to.equal(account2);
// });
it('should be able to add a post on behalf of another account', async () => {
const contentId = 'some-id';
await addPost(account2, contentId, []);