Skip to content

Commit

Permalink
Make the tag test cases more specific
Browse files Browse the repository at this point in the history
  • Loading branch information
eaviles committed Sep 25, 2018
1 parent 562bea1 commit 39f098d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/stream.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,13 @@ describe('lib/stream', () => {
const mockStream = {
StreamName: 'foo',
StreamStatus: 'ACTIVE',
Tags: [{ Key: 'baz', Value: 'qux' }, { Key: 'quux', Value: 'quuz' }]
Tags: [{ Key: 'baz', Value: 'qux' }]
};
mockStreams().push(mockStream);
await expect(stream.tag(ctx)).resolves.not.toBeDefined();
await stream.tag(ctx);
expect(client.addTagsToStream).toBeCalledWith({
StreamName: 'foo',
Tags: { baz: 'qux', corge: 'grault', quux: 'quuz' }
Tags: { baz: 'qux', corge: 'grault' }
});
expect(logger.debug.mock.calls).toEqual([
['Checking if the stream "foo" is already tagged…'],
Expand All @@ -172,7 +172,7 @@ describe('lib/stream', () => {
]
};
mockStreams().push(mockStream);
await expect(stream.tag(ctx)).resolves.not.toBeDefined();
await stream.tag(ctx);
expect(client.addTagsToStream).not.toBeCalled();
expect(logger.debug.mock.calls).toEqual([
['Checking if the stream "foo" is already tagged…'],
Expand Down

0 comments on commit 39f098d

Please sign in to comment.