@@ -62,6 +62,8 @@ def loop_times(times)
6262 curr_idx += batch_size
6363 slice = @created_users . slice ( curr_idx , batch_size )
6464 end
65+
66+ @channel . delete
6567 end
6668
6769 it 'properly sets up a new client' do
@@ -450,7 +452,7 @@ def loop_times(times)
450452
451453 it 'queries channels' do
452454 response = @client . query_channels ( { 'members' => { '$in' => [ 'legolas' ] } } , sort : { 'id' => 1 } )
453- expect ( response [ 'channels' ] . length ) . to eq 1
455+ expect ( response [ 'channels' ] . length ) . to eq 2
454456 expect ( response [ 'channels' ] [ 0 ] [ 'channel' ] [ 'id' ] ) . to eq @channel . id
455457 expect ( response [ 'channels' ] [ 0 ] [ 'members' ] . length ) . to eq 4
456458 end
@@ -1116,18 +1118,20 @@ def loop_times(times)
11161118 end
11171119
11181120 describe 'reminders' do
1119- before do
1120- @client = StreamChat ::Client . from_env
1121- @channel_id = SecureRandom . uuid
1122- @user_id = SecureRandom . uuid
1123-
1124- @channel = @client . channel ( 'messaging' , channel_id : @channel_id )
1125- @channel . create ( @user_id )
1121+ before ( :all ) do
11261122 @channel . update_partial ( { config_overrides : { user_message_reminders : true } } )
1123+ end
1124+
1125+ before ( :each ) do
1126+ @user_id = @random_user [ :id ]
11271127 @message = @channel . send_message ( { 'text' => 'Hello world' } , @user_id )
11281128 @message_id = @message [ 'message' ] [ 'id' ]
11291129 end
11301130
1131+ after ( :all ) do
1132+ @channel . update_partial ( { config_overrides : { user_message_reminders : false } } )
1133+ end
1134+
11311135 describe 'create_reminder' do
11321136 it 'create reminder' do
11331137 remind_at = DateTime . now + 1
0 commit comments