@@ -214,10 +214,10 @@ void whenUpdatingAppSettingsWithWebhookEventHooks_thenNoException() throws Strea
214214 @ Test
215215 void whenUpdatingAppSettingsWithSQSEventHook_thenNoException () throws StreamException {
216216 EventHook sqsHook = new EventHook ();
217- sqsHook .setId ("sqs-1 " );
217+ sqsHook .setId ("4f811340-1cbb-40ef-8393-1c2b2e0d339a " );
218218 sqsHook .setHookType (App .HookType .SQS );
219219 sqsHook .setEnabled (true );
220- sqsHook .setEventTypes (Arrays .asList ("user.presence.changed " , "user.updated" ));
220+ sqsHook .setEventTypes (Arrays .asList ("message.new " , "user.updated" ));
221221 sqsHook .setSqsQueueURL ("https://sqs.us-east-1.amazonaws.com/123456789012/MyQueue" );
222222 sqsHook .setSqsRegion ("us-east-1" );
223223 sqsHook .setSqsAuthType (App .AuthType .RESOURCE );
@@ -238,7 +238,7 @@ void whenUpdatingAppSettingsWithSQSEventHook_thenNoException() throws StreamExce
238238 @ Test
239239 void whenUpdatingAppSettingsWithSNSEventHook_thenNoException () throws StreamException {
240240 EventHook snsHook = new EventHook ();
241- snsHook .setId ("sns-1 " );
241+ snsHook .setId ("7469e77e-52cd-4765-8ca0-e6a28e95e482 " );
242242 snsHook .setHookType (App .HookType .SNS );
243243 snsHook .setEnabled (true );
244244 snsHook .setEventTypes (Arrays .asList ("channel.created" , "channel.updated" ));
@@ -258,27 +258,6 @@ void whenUpdatingAppSettingsWithSNSEventHook_thenNoException() throws StreamExce
258258 }
259259 }
260260
261- @ DisplayName ("App Settings update webhook events" )
262- @ Test
263- void whenUpdatingAppSettings_thenDoesntAlwaysChangeWebhookEvents () {
264- var messageNewList = Arrays .asList ("message.new" );
265- Assertions .assertDoesNotThrow (() -> App .update ().webhookEvents (messageNewList ).request ());
266-
267- var appConfig = Assertions .assertDoesNotThrow (() -> App .get ().request ()).getApp ();
268- Assertions .assertEquals (messageNewList , appConfig .getWebhookEvents ());
269-
270- // Updating another field should not change (reset) webhook events
271- Assertions .assertDoesNotThrow (() -> App .update ().remindersInterval (60 ).request ());
272-
273- appConfig = Assertions .assertDoesNotThrow (() -> App .get ().request ()).getApp ();
274- Assertions .assertEquals (messageNewList , appConfig .getWebhookEvents ());
275-
276- // Reset webhook events to defaults using an empty list
277- Assertions .assertDoesNotThrow (() -> App .update ().webhookEvents (new ArrayList <>()).request ());
278- appConfig = Assertions .assertDoesNotThrow (() -> App .get ().request ()).getApp ();
279- Assertions .assertTrue (appConfig .getWebhookEvents ().size () > 1 );
280- }
281-
282261 @ DisplayName ("AppConfig encoding should not include null fields" )
283262 @ Test
284263 void whenEncodingAppConfig_thenNoNullFields () {
0 commit comments