@webex/internal-plugin-lyra 3.0.0-beta.13 → 3.0.0-beta.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,20 +25,22 @@ describe('plugin-lyra', function () {
25
25
  before('create lyra machine', function () {
26
26
  this.timeout(retry.timeout(20000));
27
27
 
28
- return retry(() => testUsers.create({
29
- count: 1,
30
- config: {
31
- machineType: 'LYRA_SPACE',
32
- type: 'MACHINE',
33
- password: `${generateRandomString(32)}d_wA*`
34
- }
35
- }))
28
+ return retry(() =>
29
+ testUsers.create({
30
+ count: 1,
31
+ config: {
32
+ machineType: 'LYRA_SPACE',
33
+ type: 'MACHINE',
34
+ password: `${generateRandomString(32)}d_wA*`,
35
+ },
36
+ })
37
+ )
36
38
  .then((machines) => {
37
39
  lyraMachine = machines[0];
38
40
  lyraMachine.webex = new WebexCore({
39
41
  credentials: {
40
- authorization: lyraMachine.token
41
- }
42
+ authorization: lyraMachine.token,
43
+ },
42
44
  });
43
45
 
44
46
  // binding to conversation only works with webex board device
@@ -57,131 +59,174 @@ describe('plugin-lyra', function () {
57
59
  });
58
60
  });
59
61
 
60
- before('create users', () => testUsers.create({count: 2})
61
- .then((users) => {
62
+ before('create users', () =>
63
+ testUsers.create({count: 2}).then((users) => {
62
64
  participants = users;
63
65
  spock = participants[0];
64
66
 
65
- return Promise.all(Array.map(participants, (participant) => {
66
- participant.webex = new WebexCore({
67
- credentials: {
68
- authorization: participant.token
69
- }
70
- });
71
-
72
- return participant.webex.internal.mercury.connect();
73
- }));
74
- }));
75
-
76
- before('create conversation', () => retry(() => participants[0].webex.internal.conversation.create({
77
- displayName: 'Test Lyra Conversation',
78
- participants
79
- }))
80
- .then((c) => {
67
+ return Promise.all(
68
+ Array.map(participants, (participant) => {
69
+ participant.webex = new WebexCore({
70
+ credentials: {
71
+ authorization: participant.token,
72
+ },
73
+ });
74
+
75
+ return participant.webex.internal.mercury.connect();
76
+ })
77
+ );
78
+ })
79
+ );
80
+
81
+ before('create conversation', () =>
82
+ retry(() =>
83
+ participants[0].webex.internal.conversation.create({
84
+ displayName: 'Test Lyra Conversation',
85
+ participants,
86
+ })
87
+ ).then((c) => {
81
88
  conversation = c;
82
89
 
83
90
  return conversation;
84
- }));
91
+ })
92
+ );
85
93
 
86
94
  describe('#list()', () => {
87
- before('ensure participant joined space', () => spock.webex.internal.lyra.space.join(lyraSpace));
95
+ before('ensure participant joined space', () =>
96
+ spock.webex.internal.lyra.space.join(lyraSpace)
97
+ );
88
98
 
89
- it('returns spaces', () => spock.webex.internal.lyra.space.list()
90
- .then((spaces) => {
99
+ it('returns spaces', () =>
100
+ spock.webex.internal.lyra.space.list().then((spaces) => {
91
101
  assert.lengthOf(spaces, 1);
92
102
  assert.deepEqual(spaces[0].identity, lyraMachine.space.identity);
93
103
  }));
94
104
  });
95
105
 
96
106
  describe('#get()', () => {
97
- it('returns space info', () => spock.webex.internal.lyra.space.get(lyraMachine.space)
98
- .then((lyraSpace) => assert.deepEqual(lyraMachine.space.identity, lyraSpace.identity)));
107
+ it('returns space info', () =>
108
+ spock.webex.internal.lyra.space
109
+ .get(lyraMachine.space)
110
+ .then((lyraSpace) => assert.deepEqual(lyraMachine.space.identity, lyraSpace.identity)));
99
111
  });
100
112
 
101
113
  describe('#join()', () => {
102
- it('adds the current user to lyra space', () => spock.webex.internal.lyra.space.join(lyraSpace)
103
- .then(() => lyraMachine.webex.internal.lyra.space.get(lyraMachine.space))
104
- .then((lyraSpace) => {
105
- assert.lengthOf(lyraSpace.occupants.items, 1);
106
- assert.equal(lyraSpace.occupants.items[0].identity.id, spock.id);
107
- }));
114
+ it('adds the current user to lyra space', () =>
115
+ spock.webex.internal.lyra.space
116
+ .join(lyraSpace)
117
+ .then(() => lyraMachine.webex.internal.lyra.space.get(lyraMachine.space))
118
+ .then((lyraSpace) => {
119
+ assert.lengthOf(lyraSpace.occupants.items, 1);
120
+ assert.equal(lyraSpace.occupants.items[0].identity.id, spock.id);
121
+ }));
108
122
  });
109
123
 
110
124
  describe('#leave()', () => {
111
- it('removes the current user from lyra space', () => spock.webex.internal.lyra.space.join(lyraSpace)
112
- .then(() => spock.webex.internal.lyra.space.leave(lyraSpace))
113
- .then(() => lyraMachine.webex.internal.lyra.space.get(lyraMachine.space))
114
- .then((lyraSpace) => assert.lengthOf(lyraSpace.occupants.items, 0)));
125
+ it('removes the current user from lyra space', () =>
126
+ spock.webex.internal.lyra.space
127
+ .join(lyraSpace)
128
+ .then(() => spock.webex.internal.lyra.space.leave(lyraSpace))
129
+ .then(() => lyraMachine.webex.internal.lyra.space.get(lyraMachine.space))
130
+ .then((lyraSpace) => assert.lengthOf(lyraSpace.occupants.items, 0)));
115
131
 
116
132
  describe('when a user has multiple devices in the space', () => {
117
133
  before('add another device', () => {
118
134
  spock.webex2 = new WebexCore({
119
135
  credentials: {
120
- authorization: spock.token
121
- }
136
+ authorization: spock.token,
137
+ },
122
138
  });
123
139
 
124
- return spock.webex2.internal.device.register()
140
+ return spock.webex2.internal.device
141
+ .register()
125
142
  .then(() => spock.webex.internal.lyra.space.join(lyraSpace))
126
143
  .then(() => spock.webex2.internal.lyra.space.join(lyraSpace));
127
144
  });
128
145
 
129
- it('removes all devices from lyra space', () => spock.webex.internal.lyra.space.leave(lyraSpace, {
130
- removeAllDevices: true
131
- })
132
- .then(() => lyraMachine.webex.internal.lyra.space.get(lyraMachine.space))
133
- .then((lyraSpace) => assert.lengthOf(lyraSpace.occupants.items, 0)));
146
+ it('removes all devices from lyra space', () =>
147
+ spock.webex.internal.lyra.space
148
+ .leave(lyraSpace, {
149
+ removeAllDevices: true,
150
+ })
151
+ .then(() => lyraMachine.webex.internal.lyra.space.get(lyraMachine.space))
152
+ .then((lyraSpace) => assert.lengthOf(lyraSpace.occupants.items, 0)));
134
153
  });
135
154
  });
136
155
 
137
-
138
156
  // Skip until we can bind a conversation to lyra space by posting capabilities to Lyra.
139
157
 
140
158
  describe.skip('#bindConversation()', () => {
141
- before('ensure participant joined space', () => spock.webex.internal.lyra.space.join(lyraSpace)
142
- .then(() => lyraMachine.webex.internal.lyra.space.verifyOccupant(lyraMachine.space, spock.id))
143
- .then(() => spock.webex.internal.lyra.space.bindConversation(lyraSpace, conversation)));
144
-
145
- after('remove binding', () => spock.webex.internal.lyra.space.unbindConversation(lyraSpace, conversation)
146
- // After hooks shouldn't be able to break tests
147
- .catch((err) => console.error(err)));
148
-
149
- it('binds conversation and lyra space', () => spock.webex.internal.lyra.space.getCurrentBindings(lyraMachine.space)
150
- .then(({bindings}) => {
159
+ before('ensure participant joined space', () =>
160
+ spock.webex.internal.lyra.space
161
+ .join(lyraSpace)
162
+ .then(() =>
163
+ lyraMachine.webex.internal.lyra.space.verifyOccupant(lyraMachine.space, spock.id)
164
+ )
165
+ .then(() => spock.webex.internal.lyra.space.bindConversation(lyraSpace, conversation))
166
+ );
167
+
168
+ after('remove binding', () =>
169
+ spock.webex.internal.lyra.space
170
+ .unbindConversation(lyraSpace, conversation)
171
+ // After hooks shouldn't be able to break tests
172
+ .catch((err) => console.error(err))
173
+ );
174
+
175
+ it('binds conversation and lyra space', () =>
176
+ spock.webex.internal.lyra.space.getCurrentBindings(lyraMachine.space).then(({bindings}) => {
151
177
  assert.lengthOf(bindings, 1);
152
178
  assert.equal(bindings[0].conversationUrl, conversation.url);
153
179
  }));
154
180
  });
155
181
 
156
182
  describe.skip('#unbindConversation()', () => {
157
- before('ensure participant joined space', () => spock.webex.internal.lyra.space.join(lyraSpace)
158
- .then(() => lyraMachine.webex.internal.lyra.space.verifyOccupant(lyraMachine.space, spock.id))
159
- .then(() => spock.webex.internal.lyra.space.bindConversation(lyraSpace, conversation))
160
- .then(() => spock.webex.internal.lyra.space.getCurrentBindings(lyraMachine.space))
161
- .then(({bindings}) => assert.lengthOf(bindings, 1)));
183
+ before('ensure participant joined space', () =>
184
+ spock.webex.internal.lyra.space
185
+ .join(lyraSpace)
186
+ .then(() =>
187
+ lyraMachine.webex.internal.lyra.space.verifyOccupant(lyraMachine.space, spock.id)
188
+ )
189
+ .then(() => spock.webex.internal.lyra.space.bindConversation(lyraSpace, conversation))
190
+ .then(() => spock.webex.internal.lyra.space.getCurrentBindings(lyraMachine.space))
191
+ .then(({bindings}) => assert.lengthOf(bindings, 1))
192
+ );
162
193
 
163
194
  // Skip this feature in IE. We do not support it at this time.
164
- (bowser.msie ? it.skip : it)('removes the binding between conversation and lyra space', () => spock.webex.internal.lyra.space.unbindConversation(lyraSpace, conversation)
165
- .then(() => spock.webex.internal.lyra.space.getCurrentBindings(lyraMachine.space))
166
- .then(({bindings}) => assert.lengthOf(bindings, 0)));
195
+ (bowser.msie ? it.skip : it)('removes the binding between conversation and lyra space', () =>
196
+ spock.webex.internal.lyra.space
197
+ .unbindConversation(lyraSpace, conversation)
198
+ .then(() => spock.webex.internal.lyra.space.getCurrentBindings(lyraMachine.space))
199
+ .then(({bindings}) => assert.lengthOf(bindings, 0))
200
+ );
167
201
  });
168
202
 
169
203
  describe.skip('#deleteBinding()', () => {
170
204
  let bindingId;
171
205
 
172
- before('ensure participant joined space', () => spock.webex.internal.lyra.space.join(lyraSpace)
173
- .then(() => lyraMachine.webex.internal.lyra.space.verifyOccupant(lyraMachine.space, spock.id))
174
- .then(() => spock.webex.internal.lyra.space.bindConversation(lyraSpace, conversation))
175
- .then(() => spock.webex.internal.lyra.space.getCurrentBindings(lyraMachine.space))
176
- .then(({bindings}) => {
177
- assert.lengthOf(bindings, 1);
178
- bindingId = bindings[0].bindingUrl.split('/').pop();
179
- }));
206
+ before('ensure participant joined space', () =>
207
+ spock.webex.internal.lyra.space
208
+ .join(lyraSpace)
209
+ .then(() =>
210
+ lyraMachine.webex.internal.lyra.space.verifyOccupant(lyraMachine.space, spock.id)
211
+ )
212
+ .then(() => spock.webex.internal.lyra.space.bindConversation(lyraSpace, conversation))
213
+ .then(() => spock.webex.internal.lyra.space.getCurrentBindings(lyraMachine.space))
214
+ .then(({bindings}) => {
215
+ assert.lengthOf(bindings, 1);
216
+ bindingId = bindings[0].bindingUrl.split('/').pop();
217
+ })
218
+ );
180
219
 
181
220
  // Skip this feature in IE. We do not support it at this time.
182
- (bowser.msie ? it.skip : it)('removes the binding between conversation and lyra space', () => spock.webex.internal.lyra.space.deleteBinding(lyraMachine.space, {kmsResourceObjectUrl: conversation.kmsResourceObjectUrl, bindingId})
183
- .then(() => spock.webex.internal.lyra.space.getCurrentBindings(lyraMachine.space))
184
- .then(({bindings}) => assert.lengthOf(bindings, 0)));
221
+ (bowser.msie ? it.skip : it)('removes the binding between conversation and lyra space', () =>
222
+ spock.webex.internal.lyra.space
223
+ .deleteBinding(lyraMachine.space, {
224
+ kmsResourceObjectUrl: conversation.kmsResourceObjectUrl,
225
+ bindingId,
226
+ })
227
+ .then(() => spock.webex.internal.lyra.space.getCurrentBindings(lyraMachine.space))
228
+ .then(({bindings}) => assert.lengthOf(bindings, 0))
229
+ );
185
230
  });
186
231
  });
187
232
  });
@@ -12,9 +12,9 @@ describe('plugin-lyra', () => {
12
12
  const lyraSpaceUrl = `https://lyra/api/v1/${lyraSpaceId}`;
13
13
  const lyraSpace = {
14
14
  identity: {
15
- id: lyraSpaceId
15
+ id: lyraSpaceId,
16
16
  },
17
- url: lyraSpaceUrl
17
+ url: lyraSpaceUrl,
18
18
  };
19
19
 
20
20
  let webex;
@@ -22,12 +22,12 @@ describe('plugin-lyra', () => {
22
22
  before(() => {
23
23
  webex = new MockWebex({
24
24
  children: {
25
- lyra: Lyra
25
+ lyra: Lyra,
26
26
  },
27
27
  device: {
28
28
  url: 'deviceUrl',
29
- userId: '1234'
30
- }
29
+ userId: '1234',
30
+ },
31
31
  });
32
32
 
33
33
  webex.config.lyra = lyraConfig.lyra;
@@ -39,19 +39,26 @@ describe('plugin-lyra', () => {
39
39
 
40
40
  describe('device', () => {
41
41
  describe('#putAudioState', () => {
42
- it('requires audioState.deviceUrl', () => assert.isRejected(webex.internal.lyra.device.putAudioState(lyraSpace), /audioState.deviceUrl is required/));
42
+ it('requires audioState.deviceUrl', () =>
43
+ assert.isRejected(
44
+ webex.internal.lyra.device.putAudioState(lyraSpace),
45
+ /audioState.deviceUrl is required/
46
+ ));
43
47
  });
44
48
 
45
49
  describe('#setVolume', () => {
46
- it('defaults to level 0', () => webex.internal.lyra.device.setVolume(lyraSpace)
47
- .then(() => {
48
- assert.calledWith(webex.request, sinon.match({
49
- method: 'POST',
50
- uri: `${lyraSpace.url}/audio/volume/actions/set/invoke`,
51
- body: {
52
- level: 0
53
- }
54
- }));
50
+ it('defaults to level 0', () =>
51
+ webex.internal.lyra.device.setVolume(lyraSpace).then(() => {
52
+ assert.calledWith(
53
+ webex.request,
54
+ sinon.match({
55
+ method: 'POST',
56
+ uri: `${lyraSpace.url}/audio/volume/actions/set/invoke`,
57
+ body: {
58
+ level: 0,
59
+ },
60
+ })
61
+ );
55
62
  }));
56
63
  });
57
64
  });
@@ -13,8 +13,8 @@ describe('plugin-lyra', () => {
13
13
  before(() => {
14
14
  webex = new MockWebex({
15
15
  children: {
16
- lyra: Lyra
17
- }
16
+ lyra: Lyra,
17
+ },
18
18
  });
19
19
 
20
20
  webex.config.lyra = lyraConfig.lyra;
@@ -26,15 +26,20 @@ describe('plugin-lyra', () => {
26
26
 
27
27
  describe('lyra', () => {
28
28
  describe('#getAdvertisedEndpoint()', () => {
29
- it('sends GET request to proximity', () => webex.internal.lyra.getAdvertisedEndpoint('token')
30
- .then(() => assert.calledWith(webex.request, sinon.match({
31
- method: 'GET',
32
- api: 'proximity',
33
- resource: '/ultrasound/advertisements',
34
- qs: {
35
- token: 'token'
36
- }
37
- }))));
29
+ it('sends GET request to proximity', () =>
30
+ webex.internal.lyra.getAdvertisedEndpoint('token').then(() =>
31
+ assert.calledWith(
32
+ webex.request,
33
+ sinon.match({
34
+ method: 'GET',
35
+ api: 'proximity',
36
+ resource: '/ultrasound/advertisements',
37
+ qs: {
38
+ token: 'token',
39
+ },
40
+ })
41
+ )
42
+ ));
38
43
  });
39
44
  });
40
45
  });
@@ -12,13 +12,13 @@ describe('plugin-lyra', () => {
12
12
  const lyraSpaceUrl = `https://lyra/api/v1/${lyraSpaceId}`;
13
13
  const lyraSpace = {
14
14
  identity: {
15
- id: lyraSpaceId
15
+ id: lyraSpaceId,
16
16
  },
17
- url: lyraSpaceUrl
17
+ url: lyraSpaceUrl,
18
18
  };
19
19
  const conversation = {
20
20
  url: 'https://conversation',
21
- kmsResourceObjectUrl: 'https://kms'
21
+ kmsResourceObjectUrl: 'https://kms',
22
22
  };
23
23
 
24
24
  let webex;
@@ -26,13 +26,13 @@ describe('plugin-lyra', () => {
26
26
  before(() => {
27
27
  webex = new MockWebex({
28
28
  children: {
29
- lyra: Lyra
30
- }
29
+ lyra: Lyra,
30
+ },
31
31
  });
32
32
 
33
33
  webex.internal.device = {
34
34
  url: 'deviceUrl',
35
- userId: '1234'
35
+ userId: '1234',
36
36
  };
37
37
  webex.config.lyra = lyraConfig.lyra;
38
38
  });
@@ -43,86 +43,147 @@ describe('plugin-lyra', () => {
43
43
 
44
44
  describe('space', () => {
45
45
  describe('#get()', () => {
46
- it('requires space.id', () => assert.isRejected(webex.internal.lyra.space.get(), /space.id is required/));
46
+ it('requires space.id', () =>
47
+ assert.isRejected(webex.internal.lyra.space.get(), /space.id is required/));
47
48
  });
48
49
 
49
50
  describe('#join()', () => {
50
- it('defaults to MANUAL pass type', () => webex.internal.lyra.space.join(lyraSpace)
51
- .then(() => assert.calledWith(webex.request, sinon.match({
52
- method: 'PUT',
53
- api: 'lyra',
54
- resource: `${lyraSpace.url}/occupants/@me`,
55
- body: {
56
- pass: {
57
- type: 'MANUAL'
58
- },
59
- deviceUrl: 'deviceUrl'
60
- }
61
- }))));
51
+ it('defaults to MANUAL pass type', () =>
52
+ webex.internal.lyra.space.join(lyraSpace).then(() =>
53
+ assert.calledWith(
54
+ webex.request,
55
+ sinon.match({
56
+ method: 'PUT',
57
+ api: 'lyra',
58
+ resource: `${lyraSpace.url}/occupants/@me`,
59
+ body: {
60
+ pass: {
61
+ type: 'MANUAL',
62
+ },
63
+ deviceUrl: 'deviceUrl',
64
+ },
65
+ })
66
+ )
67
+ ));
62
68
 
63
- it('allows other pass type', () => webex.internal.lyra.space.join(lyraSpace, {passType: 'TEST'})
64
- .then(() => assert.calledWith(webex.request, sinon.match({
65
- method: 'PUT',
66
- api: 'lyra',
67
- resource: `${lyraSpace.url}/occupants/@me`,
68
- body: {
69
- pass: {
70
- type: 'TEST'
71
- },
72
- deviceUrl: 'deviceUrl'
73
- }
74
- }))));
69
+ it('allows other pass type', () =>
70
+ webex.internal.lyra.space.join(lyraSpace, {passType: 'TEST'}).then(() =>
71
+ assert.calledWith(
72
+ webex.request,
73
+ sinon.match({
74
+ method: 'PUT',
75
+ api: 'lyra',
76
+ resource: `${lyraSpace.url}/occupants/@me`,
77
+ body: {
78
+ pass: {
79
+ type: 'TEST',
80
+ },
81
+ deviceUrl: 'deviceUrl',
82
+ },
83
+ })
84
+ )
85
+ ));
75
86
 
76
- it('allows another uri', () => webex.internal.lyra.space.join(lyraSpace, {uri: 'https://customUrl'})
77
- .then(() => assert.calledWith(webex.request, sinon.match({
78
- method: 'PUT',
79
- uri: 'https://customUrl',
80
- body: {
81
- pass: {
82
- type: 'MANUAL'
83
- },
84
- deviceUrl: 'deviceUrl'
85
- }
86
- }))));
87
+ it('allows another uri', () =>
88
+ webex.internal.lyra.space.join(lyraSpace, {uri: 'https://customUrl'}).then(() =>
89
+ assert.calledWith(
90
+ webex.request,
91
+ sinon.match({
92
+ method: 'PUT',
93
+ uri: 'https://customUrl',
94
+ body: {
95
+ pass: {
96
+ type: 'MANUAL',
97
+ },
98
+ deviceUrl: 'deviceUrl',
99
+ },
100
+ })
101
+ )
102
+ ));
87
103
 
88
-
89
- it('passes on extra data field', () => webex.internal.lyra.space.join(lyraSpace, {
90
- passType: 'TEST',
91
- data: {proof: 'abc'}
92
- })
93
- .then(() => assert.calledWith(webex.request, sinon.match({
94
- method: 'PUT',
95
- api: 'lyra',
96
- resource: `${lyraSpace.url}/occupants/@me`,
97
- body: {
98
- pass: {
99
- type: 'TEST',
100
- data: {proof: 'abc'}
101
- },
102
- deviceUrl: 'deviceUrl'
103
- }
104
- }))));
104
+ it('passes on extra data field', () =>
105
+ webex.internal.lyra.space
106
+ .join(lyraSpace, {
107
+ passType: 'TEST',
108
+ data: {proof: 'abc'},
109
+ })
110
+ .then(() =>
111
+ assert.calledWith(
112
+ webex.request,
113
+ sinon.match({
114
+ method: 'PUT',
115
+ api: 'lyra',
116
+ resource: `${lyraSpace.url}/occupants/@me`,
117
+ body: {
118
+ pass: {
119
+ type: 'TEST',
120
+ data: {proof: 'abc'},
121
+ },
122
+ deviceUrl: 'deviceUrl',
123
+ },
124
+ })
125
+ )
126
+ ));
105
127
  });
106
128
 
107
129
  describe('#bindConversation()', () => {
108
- it('requires space.url', () => assert.isRejected(webex.internal.lyra.space.bindConversation(), /space.url is required/));
109
- it('requires space.id', () => assert.isRejected(webex.internal.lyra.space.bindConversation({url: lyraSpaceUrl}), /space.id is required/));
110
- it('requires conversation.url', () => assert.isRejected(webex.internal.lyra.space.bindConversation(lyraSpace, {kmsResourceObjectUrl: 'url'}), /conversation.url is required/));
111
- it('requires conversation.kmsResourceObjectUrl', () => assert.isRejected(webex.internal.lyra.space.bindConversation(lyraSpace, {url: 'url'}), /conversation.kmsResourceObjectUrl is required/));
130
+ it('requires space.url', () =>
131
+ assert.isRejected(webex.internal.lyra.space.bindConversation(), /space.url is required/));
132
+ it('requires space.id', () =>
133
+ assert.isRejected(
134
+ webex.internal.lyra.space.bindConversation({url: lyraSpaceUrl}),
135
+ /space.id is required/
136
+ ));
137
+ it('requires conversation.url', () =>
138
+ assert.isRejected(
139
+ webex.internal.lyra.space.bindConversation(lyraSpace, {kmsResourceObjectUrl: 'url'}),
140
+ /conversation.url is required/
141
+ ));
142
+ it('requires conversation.kmsResourceObjectUrl', () =>
143
+ assert.isRejected(
144
+ webex.internal.lyra.space.bindConversation(lyraSpace, {url: 'url'}),
145
+ /conversation.kmsResourceObjectUrl is required/
146
+ ));
112
147
  });
113
148
 
114
149
  describe('#unbindConversation()', () => {
115
- it('requires space.url', () => assert.isRejected(webex.internal.lyra.space.unbindConversation(), /space.url is required/));
116
- it('requires space.id', () => assert.isRejected(webex.internal.lyra.space.unbindConversation({url: lyraSpaceUrl}), /space.id is required/));
117
- it('requires conversation.url', () => assert.isRejected(webex.internal.lyra.space.unbindConversation(lyraSpace, {kmsResourceObjectUrl: 'url'}), /conversation.url is required/));
118
- it('requires conversation.kmsResourceObjectUrl', () => assert.isRejected(webex.internal.lyra.space.unbindConversation(lyraSpace, {url: conversation.url}), /conversation.kmsResourceObjectUrl is required/));
150
+ it('requires space.url', () =>
151
+ assert.isRejected(webex.internal.lyra.space.unbindConversation(), /space.url is required/));
152
+ it('requires space.id', () =>
153
+ assert.isRejected(
154
+ webex.internal.lyra.space.unbindConversation({url: lyraSpaceUrl}),
155
+ /space.id is required/
156
+ ));
157
+ it('requires conversation.url', () =>
158
+ assert.isRejected(
159
+ webex.internal.lyra.space.unbindConversation(lyraSpace, {kmsResourceObjectUrl: 'url'}),
160
+ /conversation.url is required/
161
+ ));
162
+ it('requires conversation.kmsResourceObjectUrl', () =>
163
+ assert.isRejected(
164
+ webex.internal.lyra.space.unbindConversation(lyraSpace, {url: conversation.url}),
165
+ /conversation.kmsResourceObjectUrl is required/
166
+ ));
119
167
  });
120
168
 
121
169
  describe('#deleteBinding', () => {
122
- it('requires space.url', () => assert.isRejected(webex.internal.lyra.space.deleteBinding(), /space.url is required/));
123
- it('requires space.id', () => assert.isRejected(webex.internal.lyra.space.deleteBinding({url: lyraSpaceUrl}), /space.id is required/));
124
- it('requires options.kmsResourceObjectUrl', () => assert.isRejected(webex.internal.lyra.space.deleteBinding(lyraSpace, {bindingId: '123'}), /kmsResourceObjectUrl is required/));
125
- it('requires options.bindingId', () => assert.isRejected(webex.internal.lyra.space.deleteBinding(lyraSpace, {kmsResourceObjectUrl: 'url'}), /options.bindingId is required/));
170
+ it('requires space.url', () =>
171
+ assert.isRejected(webex.internal.lyra.space.deleteBinding(), /space.url is required/));
172
+ it('requires space.id', () =>
173
+ assert.isRejected(
174
+ webex.internal.lyra.space.deleteBinding({url: lyraSpaceUrl}),
175
+ /space.id is required/
176
+ ));
177
+ it('requires options.kmsResourceObjectUrl', () =>
178
+ assert.isRejected(
179
+ webex.internal.lyra.space.deleteBinding(lyraSpace, {bindingId: '123'}),
180
+ /kmsResourceObjectUrl is required/
181
+ ));
182
+ it('requires options.bindingId', () =>
183
+ assert.isRejected(
184
+ webex.internal.lyra.space.deleteBinding(lyraSpace, {kmsResourceObjectUrl: 'url'}),
185
+ /options.bindingId is required/
186
+ ));
126
187
  });
127
188
  });
128
189
  });