Expect correct arguments for storing meta doc
This commit is contained in:
parent
8744307ee7
commit
185d9c71df
@ -89,7 +89,7 @@ describe('ChatMessages', function () {
|
|||||||
before(function() {
|
before(function() {
|
||||||
sandbox.stub(archive.client, 'getObject').withArgs(archive.metaPath)
|
sandbox.stub(archive.client, 'getObject').withArgs(archive.metaPath)
|
||||||
.returns({
|
.returns({
|
||||||
'@id': `chat-messages/irc.libera.chat/channels/kosmos/meta`,
|
'@id': archive.metaPath,
|
||||||
'@type': 'ChatChannelMeta',
|
'@type': 'ChatChannelMeta',
|
||||||
first: '2021/01/01', last: '2022/08/10'
|
first: '2021/01/01', last: '2022/08/10'
|
||||||
})
|
})
|
||||||
@ -98,7 +98,13 @@ describe('ChatMessages', function () {
|
|||||||
|
|
||||||
it('stores a new archive', async function () {
|
it('stores a new archive', async function () {
|
||||||
await archive._updateArchiveMetaDocument();
|
await archive._updateArchiveMetaDocument();
|
||||||
sandbox.assert.calledOnce(archive.client.storeObject);
|
sandbox.assert.calledWithMatch(
|
||||||
|
archive.client.storeObject,
|
||||||
|
'daily-archive-meta', archive.metaPath, {
|
||||||
|
'@id': archive.metaPath, '@type': 'ChatChannelMeta',
|
||||||
|
first: '2021/01/01', last: '2022/08/11'
|
||||||
|
}
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
after(function() { sandbox.restore() });
|
after(function() { sandbox.restore() });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user