Skip to content

Commit be27b37

Browse files
authored
test: new step clause for objects v2 contract test. (#297)
1 parent 4fe8bdd commit be27b37

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

test/contract/steps/objectsv2/channel_member.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ Then('the response contains list with {string} member', function (member) {
5858
expect(actual).to.deep.include(memberData);
5959
});
6060

61+
Given('the data for {string} member that we want to remove', function (member) {
62+
const memberData = this.getFixture(member);
63+
this.parameter = { ...this.parameter, uuids: [{ id: memberData.uuid.id }] };
64+
});
65+
6166
When('I remove a channel member', async function () {
6267
const pubnub = await this.getPubnub({
6368
publishKey: this.keyset.publishKey,

test/contract/steps/objectsv2/membership.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ When('I set the membership for current user', async function () {
5151
this.response = await pubnub.objects.setMemberships(this.parameter);
5252
});
5353

54+
Given('the data for {string} membership that we want to remove', function (membership) {
55+
const membershipData = this.getFixture(membership);
56+
this.parameter = { ...this.parameter, channels: [{ id: membershipData.channel.id }] };
57+
});
58+
5459
When('I remove the membership', async function () {
5560
const pubnub = await this.getPubnub({
5661
publishKey: this.keyset.publishKey,

0 commit comments

Comments
 (0)