Skip to content

Commit

Permalink
feat: add test for notifications_muted query members (#143)
Browse files Browse the repository at this point in the history
Signed-off-by: Federico Guerinoni <federico.guerinoni@getstream.io>
  • Loading branch information
guerinoni authored May 22, 2024
1 parent 0eaa532 commit c25d107
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/test/java/io/getstream/chat/java/ChannelTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,21 @@ void whenMutingChannel_thenIsMuted() {
.findFirst()
.get());
Assertions.assertTrue(channelMember.getNotificationsMuted());

ChannelMember chm =
Assertions.assertDoesNotThrow(
() ->
Channel.queryMembers()
.filterCondition("notifications_muted", true)
.id(channel.getId())
.type(channel.getType())
.request()
.getMembers()
.stream()
.filter(cm -> cm.getUserId().equals(testUserRequestObject.getId()))
.findFirst()
.get());
Assertions.assertTrue(chm.getNotificationsMuted());
}

private boolean isChannelMutedForTestUser(String channelType, String channelId) {
Expand Down

0 comments on commit c25d107

Please sign in to comment.