From c5bd39ef87f1a949d30b94b416fa182ae6c39f3f Mon Sep 17 00:00:00 2001 From: nijeeshjoshy Date: Tue, 1 Jul 2025 13:20:40 +0200 Subject: [PATCH 01/10] isloated tests --- spec/client_spec.rb | 17 ++++++++++------- spec/moderation_spec.rb | 15 +++++++++------ 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/spec/client_spec.rb b/spec/client_spec.rb index b970893..ea02bef 100644 --- a/spec/client_spec.rb +++ b/spec/client_spec.rb @@ -32,19 +32,22 @@ def loop_times(times) { id: 'legolas', name: 'Legolas', race: 'Elf', age: 500 } ] @client.upsert_users(@fellowship_of_the_ring) - @channel = @client.channel('team', channel_id: 'fellowship-of-the-ring', + + # Create a new channel for chat max length for channel_id is 64 characters + channel_id = 'fellowship-of-the-ring-chat-' + SecureRandom.alphanumeric(20) + + @channel = @client.channel('team', channel_id: channel_id, data: { members: @fellowship_of_the_ring.map { |fellow| fellow[:id] } }) @channel.create('gandalf') end before(:each) do - @random_users = [{ id: SecureRandom.uuid }, { id: SecureRandom.uuid }] - @random_user = { id: SecureRandom.uuid } - users_to_insert = [@random_users[0], @random_users[1], @random_user] + @random_users = [{ id: SecureRandom.uuid }, { id: SecureRandom.uuid }, { id: SecureRandom.uuid }] + @random_user = @random_users[0] - @created_users.push(*users_to_insert.map { |u| u[:id] }) + @created_users.push(*@random_users.map { |u| u[:id] }) - @client.upsert_users(users_to_insert) + @client.upsert_users(@random_users) end after(:all) do @@ -448,7 +451,7 @@ def loop_times(times) it 'queries channels' do response = @client.query_channels({ 'members' => { '$in' => ['legolas'] } }, sort: { 'id' => 1 }) expect(response['channels'].length).to eq 1 - expect(response['channels'][0]['channel']['id']).to eq 'fellowship-of-the-ring' + expect(response['channels'][0]['channel']['id']).to eq @channel.id expect(response['channels'][0]['members'].length).to eq 4 end diff --git a/spec/moderation_spec.rb b/spec/moderation_spec.rb index 20b05ce..a79f56c 100644 --- a/spec/moderation_spec.rb +++ b/spec/moderation_spec.rb @@ -32,19 +32,22 @@ def loop_times(times) { id: 'legolas', name: 'Legolas', race: 'Elf', age: 500 } ] @client.upsert_users(@fellowship_of_the_ring) - @channel = @client.channel('team', channel_id: 'fellowship-of-the-ring', + + # Create a new channel for moderation + channel_id = 'fellowship-of-the-ring-moderation-' + SecureRandom.alphanumeric(20) + + @channel = @client.channel('team', channel_id: channel_id, data: { members: @fellowship_of_the_ring.map { |fellow| fellow[:id] } }) @channel.create('gandalf') end before(:each) do - @random_users = [{ id: SecureRandom.uuid }, { id: SecureRandom.uuid }] - @random_user = { id: SecureRandom.uuid } - users_to_insert = [@random_users[0], @random_users[1], @random_user] + @random_users = [{ id: SecureRandom.uuid }, { id: SecureRandom.uuid }, { id: SecureRandom.uuid }] + @random_user = @random_users[0] - @created_users.push(*users_to_insert.map { |u| u[:id] }) + @created_users.push(*@random_users.map { |u| u[:id] }) - @client.upsert_users(users_to_insert) + @client.upsert_users(@random_users) end after(:all) do From 68869f10fe403856c6ed4c02e5a3119ef548ec7a Mon Sep 17 00:00:00 2001 From: nijeeshjoshy Date: Tue, 1 Jul 2025 13:27:42 +0200 Subject: [PATCH 02/10] added random user-names --- spec/client_spec.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spec/client_spec.rb b/spec/client_spec.rb index ea02bef..26de765 100644 --- a/spec/client_spec.rb +++ b/spec/client_spec.rb @@ -1119,12 +1119,13 @@ def loop_times(times) before do @client = StreamChat::Client.from_env @channel_id = SecureRandom.uuid + @user_id = SecureRandom.uuid + @channel = @client.channel('messaging', channel_id: @channel_id) - @channel.create('john') + @channel.create(@user_id) @channel.update_partial({ config_overrides: { user_message_reminders: true } }) - @message = @channel.send_message({ 'text' => 'Hello world' }, 'john') + @message = @channel.send_message({ 'text' => 'Hello world' }, @user_id) @message_id = @message['message']['id'] - @user_id = 'john' end describe 'create_reminder' do From 7d9434e2dd35493aca80f7ae39e6be061765d545 Mon Sep 17 00:00:00 2001 From: nijeeshjoshy Date: Tue, 1 Jul 2025 13:28:57 +0200 Subject: [PATCH 03/10] chore: linting fixes --- spec/client_spec.rb | 6 +++--- spec/moderation_spec.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/client_spec.rb b/spec/client_spec.rb index 26de765..5d64c46 100644 --- a/spec/client_spec.rb +++ b/spec/client_spec.rb @@ -32,10 +32,10 @@ def loop_times(times) { id: 'legolas', name: 'Legolas', race: 'Elf', age: 500 } ] @client.upsert_users(@fellowship_of_the_ring) - + # Create a new channel for chat max length for channel_id is 64 characters channel_id = 'fellowship-of-the-ring-chat-' + SecureRandom.alphanumeric(20) - + @channel = @client.channel('team', channel_id: channel_id, data: { members: @fellowship_of_the_ring.map { |fellow| fellow[:id] } }) @channel.create('gandalf') @@ -1120,7 +1120,7 @@ def loop_times(times) @client = StreamChat::Client.from_env @channel_id = SecureRandom.uuid @user_id = SecureRandom.uuid - + @channel = @client.channel('messaging', channel_id: @channel_id) @channel.create(@user_id) @channel.update_partial({ config_overrides: { user_message_reminders: true } }) diff --git a/spec/moderation_spec.rb b/spec/moderation_spec.rb index a79f56c..bd46202 100644 --- a/spec/moderation_spec.rb +++ b/spec/moderation_spec.rb @@ -32,7 +32,7 @@ def loop_times(times) { id: 'legolas', name: 'Legolas', race: 'Elf', age: 500 } ] @client.upsert_users(@fellowship_of_the_ring) - + # Create a new channel for moderation channel_id = 'fellowship-of-the-ring-moderation-' + SecureRandom.alphanumeric(20) From caa78bf2b6df65e8806002f3dd6f6821f2c33ec7 Mon Sep 17 00:00:00 2001 From: nijeeshjoshy Date: Tue, 1 Jul 2025 13:29:39 +0200 Subject: [PATCH 04/10] chore: linting errors fix --- spec/client_spec.rb | 2 +- spec/moderation_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/client_spec.rb b/spec/client_spec.rb index 5d64c46..8ea6f2b 100644 --- a/spec/client_spec.rb +++ b/spec/client_spec.rb @@ -34,7 +34,7 @@ def loop_times(times) @client.upsert_users(@fellowship_of_the_ring) # Create a new channel for chat max length for channel_id is 64 characters - channel_id = 'fellowship-of-the-ring-chat-' + SecureRandom.alphanumeric(20) + channel_id = "fellowship-of-the-ring-chat-#{SecureRandom.alphanumeric(20)}" @channel = @client.channel('team', channel_id: channel_id, data: { members: @fellowship_of_the_ring.map { |fellow| fellow[:id] } }) diff --git a/spec/moderation_spec.rb b/spec/moderation_spec.rb index bd46202..fd0d082 100644 --- a/spec/moderation_spec.rb +++ b/spec/moderation_spec.rb @@ -34,7 +34,7 @@ def loop_times(times) @client.upsert_users(@fellowship_of_the_ring) # Create a new channel for moderation - channel_id = 'fellowship-of-the-ring-moderation-' + SecureRandom.alphanumeric(20) + channel_id = "fellowship-of-the-ring-moderation-#{SecureRandom.alphanumeric(20)}" @channel = @client.channel('team', channel_id: channel_id, data: { members: @fellowship_of_the_ring.map { |fellow| fellow[:id] } }) From e4f5362cae02866377b6251fb510f1b60c60062e Mon Sep 17 00:00:00 2001 From: nijeeshjoshy Date: Tue, 1 Jul 2025 13:43:12 +0200 Subject: [PATCH 05/10] added channel cleanup after test run --- spec/client_spec.rb | 20 ++++++++++++-------- spec/moderation_spec.rb | 2 ++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/spec/client_spec.rb b/spec/client_spec.rb index 8ea6f2b..b9ff1bc 100644 --- a/spec/client_spec.rb +++ b/spec/client_spec.rb @@ -62,6 +62,8 @@ def loop_times(times) curr_idx += batch_size slice = @created_users.slice(curr_idx, batch_size) end + + @channel.delete end it 'properly sets up a new client' do @@ -450,7 +452,7 @@ def loop_times(times) it 'queries channels' do response = @client.query_channels({ 'members' => { '$in' => ['legolas'] } }, sort: { 'id' => 1 }) - expect(response['channels'].length).to eq 1 + expect(response['channels'].length).to eq 2 expect(response['channels'][0]['channel']['id']).to eq @channel.id expect(response['channels'][0]['members'].length).to eq 4 end @@ -1116,18 +1118,20 @@ def loop_times(times) end describe 'reminders' do - before do - @client = StreamChat::Client.from_env - @channel_id = SecureRandom.uuid - @user_id = SecureRandom.uuid - - @channel = @client.channel('messaging', channel_id: @channel_id) - @channel.create(@user_id) + before(:all) do @channel.update_partial({ config_overrides: { user_message_reminders: true } }) + end + + before(:each) do + @user_id = @random_user[:id] @message = @channel.send_message({ 'text' => 'Hello world' }, @user_id) @message_id = @message['message']['id'] end + after(:all) do + @channel.update_partial({ config_overrides: { user_message_reminders: false } }) + end + describe 'create_reminder' do it 'create reminder' do remind_at = DateTime.now + 1 diff --git a/spec/moderation_spec.rb b/spec/moderation_spec.rb index fd0d082..6e51061 100644 --- a/spec/moderation_spec.rb +++ b/spec/moderation_spec.rb @@ -62,6 +62,8 @@ def loop_times(times) curr_idx += batch_size slice = @created_users.slice(curr_idx, batch_size) end + + @channel.delete end it 'properly sets up a new client' do From 57c6edd9125462d2842bea98ce0aaf2fd4ae474d Mon Sep 17 00:00:00 2001 From: nijeeshjoshy Date: Tue, 1 Jul 2025 14:18:59 +0200 Subject: [PATCH 06/10] added more cleanup --- spec/client_spec.rb | 8 ++++++-- spec/moderation_spec.rb | 6 ++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/spec/client_spec.rb b/spec/client_spec.rb index b9ff1bc..aa7ef74 100644 --- a/spec/client_spec.rb +++ b/spec/client_spec.rb @@ -51,19 +51,23 @@ def loop_times(times) end after(:all) do + @users_to_delete = @created_users.dup + @fellowship_of_the_ring.map { |fellow| fellow[:id] } curr_idx = 0 batch_size = 25 - slice = @created_users.slice(0, batch_size) + slice = @users_to_delete.slice(0, batch_size) while !slice.nil? && !slice.empty? @client.delete_users(slice, user: StreamChat::HARD_DELETE, messages: StreamChat::HARD_DELETE) curr_idx += batch_size - slice = @created_users.slice(curr_idx, batch_size) + slice = @users_to_delete.slice(curr_idx, batch_size) end @channel.delete + rescue StreamChat::StreamAPIException + # if the channel is already deleted by the test, we can ignore the error + logger.info "Error cleaning up testcase: #{e.message}" end it 'properly sets up a new client' do diff --git a/spec/moderation_spec.rb b/spec/moderation_spec.rb index 6e51061..0558cef 100644 --- a/spec/moderation_spec.rb +++ b/spec/moderation_spec.rb @@ -54,13 +54,15 @@ def loop_times(times) curr_idx = 0 batch_size = 25 - slice = @created_users.slice(0, batch_size) + @users_to_delete = @created_users.dup + @fellowship_of_the_ring.map { |fellow| fellow[:id] } + + slice = @users_to_delete.slice(0, batch_size) while !slice.nil? && !slice.empty? @client.delete_users(slice, user: StreamChat::HARD_DELETE, messages: StreamChat::HARD_DELETE) curr_idx += batch_size - slice = @created_users.slice(curr_idx, batch_size) + slice = @users_to_delete.slice(curr_idx, batch_size) end @channel.delete From dcf2b063087188b898fc1aecf8f816bb9fca3c0e Mon Sep 17 00:00:00 2001 From: nijeeshjoshy Date: Tue, 1 Jul 2025 14:21:53 +0200 Subject: [PATCH 07/10] added more cleanup --- spec/client_spec.rb | 7 ++----- spec/moderation_spec.rb | 3 ++- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/spec/client_spec.rb b/spec/client_spec.rb index aa7ef74..f8ef1f0 100644 --- a/spec/client_spec.rb +++ b/spec/client_spec.rb @@ -51,6 +51,8 @@ def loop_times(times) end after(:all) do + @channel.delete + @users_to_delete = @created_users.dup + @fellowship_of_the_ring.map { |fellow| fellow[:id] } curr_idx = 0 batch_size = 25 @@ -63,11 +65,6 @@ def loop_times(times) curr_idx += batch_size slice = @users_to_delete.slice(curr_idx, batch_size) end - - @channel.delete - rescue StreamChat::StreamAPIException - # if the channel is already deleted by the test, we can ignore the error - logger.info "Error cleaning up testcase: #{e.message}" end it 'properly sets up a new client' do diff --git a/spec/moderation_spec.rb b/spec/moderation_spec.rb index 0558cef..5ae9af3 100644 --- a/spec/moderation_spec.rb +++ b/spec/moderation_spec.rb @@ -51,6 +51,8 @@ def loop_times(times) end after(:all) do + @channel.delete + curr_idx = 0 batch_size = 25 @@ -65,7 +67,6 @@ def loop_times(times) slice = @users_to_delete.slice(curr_idx, batch_size) end - @channel.delete end it 'properly sets up a new client' do From 01ac35a6cba2c927ab248f032625423f8dad1117 Mon Sep 17 00:00:00 2001 From: nijeeshjoshy Date: Tue, 1 Jul 2025 14:29:45 +0200 Subject: [PATCH 08/10] chore: changed user ids in moderation specs --- spec/client_spec.rb | 2 +- spec/moderation_spec.rb | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/client_spec.rb b/spec/client_spec.rb index f8ef1f0..df807c8 100644 --- a/spec/client_spec.rb +++ b/spec/client_spec.rb @@ -453,7 +453,7 @@ def loop_times(times) it 'queries channels' do response = @client.query_channels({ 'members' => { '$in' => ['legolas'] } }, sort: { 'id' => 1 }) - expect(response['channels'].length).to eq 2 + expect(response['channels'].length).to eq 1 expect(response['channels'][0]['channel']['id']).to eq @channel.id expect(response['channels'][0]['members'].length).to eq 4 end diff --git a/spec/moderation_spec.rb b/spec/moderation_spec.rb index 5ae9af3..36b1b86 100644 --- a/spec/moderation_spec.rb +++ b/spec/moderation_spec.rb @@ -26,10 +26,10 @@ def loop_times(times) @created_users = [] @fellowship_of_the_ring = [ - { id: 'frodo-baggins', name: 'Frodo Baggins', race: 'Hobbit', age: 50 }, - { id: 'sam-gamgee', name: 'Samwise Gamgee', race: 'Hobbit', age: 38 }, - { id: 'gandalf', name: 'Gandalf the Grey', race: 'Istari' }, - { id: 'legolas', name: 'Legolas', race: 'Elf', age: 500 } + { id: SecureRandom.uuid, name: 'Frodo Baggins', race: 'Hobbit', age: 50 }, + { id: SecureRandom.uuid, name: 'Samwise Gamgee', race: 'Hobbit', age: 38 }, + { id: SecureRandom.uuid, name: 'Gandalf the Grey', race: 'Istari' }, + { id: SecureRandom.uuid, name: 'Legolas', race: 'Elf', age: 500 } ] @client.upsert_users(@fellowship_of_the_ring) @@ -38,7 +38,7 @@ def loop_times(times) @channel = @client.channel('team', channel_id: channel_id, data: { members: @fellowship_of_the_ring.map { |fellow| fellow[:id] } }) - @channel.create('gandalf') + @channel.create(@fellowship_of_the_ring[2][:id]) end before(:each) do From ad768d8ad74a9c208728dd79229bdf780243af1b Mon Sep 17 00:00:00 2001 From: nijeeshjoshy Date: Tue, 1 Jul 2025 14:30:18 +0200 Subject: [PATCH 09/10] linting errors --- spec/moderation_spec.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spec/moderation_spec.rb b/spec/moderation_spec.rb index 36b1b86..0679e96 100644 --- a/spec/moderation_spec.rb +++ b/spec/moderation_spec.rb @@ -52,7 +52,7 @@ def loop_times(times) after(:all) do @channel.delete - + curr_idx = 0 batch_size = 25 @@ -66,7 +66,6 @@ def loop_times(times) curr_idx += batch_size slice = @users_to_delete.slice(curr_idx, batch_size) end - end it 'properly sets up a new client' do From 6e5da01be87229a092a3dc96fbc7adcf3e0e81cf Mon Sep 17 00:00:00 2001 From: nijeeshjoshy Date: Tue, 1 Jul 2025 15:33:36 +0200 Subject: [PATCH 10/10] randomized the user creation --- spec/client_spec.rb | 48 +++++++++++++++++++++-------------------- spec/moderation_spec.rb | 5 +++++ 2 files changed, 30 insertions(+), 23 deletions(-) diff --git a/spec/client_spec.rb b/spec/client_spec.rb index df807c8..1244d93 100644 --- a/spec/client_spec.rb +++ b/spec/client_spec.rb @@ -26,11 +26,17 @@ def loop_times(times) @created_users = [] @fellowship_of_the_ring = [ - { id: 'frodo-baggins', name: 'Frodo Baggins', race: 'Hobbit', age: 50 }, - { id: 'sam-gamgee', name: 'Samwise Gamgee', race: 'Hobbit', age: 38 }, - { id: 'gandalf', name: 'Gandalf the Grey', race: 'Istari' }, - { id: 'legolas', name: 'Legolas', race: 'Elf', age: 500 } + { id: SecureRandom.uuid, name: 'Frodo Baggins', race: 'Hobbit', age: 50 }, + { id: SecureRandom.uuid, name: 'Samwise Gamgee', race: 'Hobbit', age: 38 }, + { id: SecureRandom.uuid, name: 'Gandalf the Grey', race: 'Istari' }, + { id: SecureRandom.uuid, name: 'Legolas', race: 'Elf', age: 500 } ] + + @legolas = @fellowship_of_the_ring[3][:id] + @gandalf = @fellowship_of_the_ring[2][:id] + @frodo = @fellowship_of_the_ring[0][:id] + @sam = @fellowship_of_the_ring[1][:id] + @client.upsert_users(@fellowship_of_the_ring) # Create a new channel for chat max length for channel_id is 64 characters @@ -38,7 +44,7 @@ def loop_times(times) @channel = @client.channel('team', channel_id: channel_id, data: { members: @fellowship_of_the_ring.map { |fellow| fellow[:id] } }) - @channel.create('gandalf') + @channel.create(@gandalf) end before(:each) do @@ -226,7 +232,7 @@ def loop_times(times) end it 'exports a user' do - response = @client.export_user('gandalf') + response = @client.export_user(@gandalf) expect(response).to include 'user' expect(response['user']['name']).to eq('Gandalf the Grey') end @@ -452,7 +458,7 @@ def loop_times(times) end it 'queries channels' do - response = @client.query_channels({ 'members' => { '$in' => ['legolas'] } }, sort: { 'id' => 1 }) + response = @client.query_channels({ 'members' => { '$in' => [@legolas] } }, sort: { 'id' => 1 }) expect(response['channels'].length).to eq 1 expect(response['channels'][0]['channel']['id']).to eq @channel.id expect(response['channels'][0]['members'].length).to eq 4 @@ -511,41 +517,41 @@ def loop_times(times) describe 'search' do it 'search for messages' do text = SecureRandom.uuid - @channel.send_message({ text: text }, 'legolas') - resp = @client.search({ members: { '$in' => ['legolas'] } }, text) + @channel.send_message({ text: text }, @fellowship_of_the_ring[2][:id]) + resp = @client.search({ members: { '$in' => [@fellowship_of_the_ring[2][:id]] } }, text) p resp expect(resp['results'].length).to eq(1) end it 'search for messages with filter conditions' do text = SecureRandom.uuid - @channel.send_message({ text: text }, 'legolas') - resp = @client.search({ members: { '$in' => ['legolas'] } }, { text: { '$q': text } }) + @channel.send_message({ text: text }, @legolas) + resp = @client.search({ members: { '$in' => [@legolas] } }, { text: { '$q': text } }) expect(resp['results'].length).to eq(1) end it 'offset with sort should fail' do expect do - @client.search({ members: { '$in' => ['legolas'] } }, SecureRandom.uuid, sort: { created_at: -1 }, offset: 2) + @client.search({ members: { '$in' => [@legolas] } }, SecureRandom.uuid, sort: { created_at: -1 }, offset: 2) end.to raise_error(/cannot use offset with next or sort parameters/) end it 'offset with next should fail' do expect do - @client.search({ members: { '$in' => ['legolas'] } }, SecureRandom.uuid, offset: 2, next: SecureRandom.uuid) + @client.search({ members: { '$in' => [@legolas] } }, SecureRandom.uuid, offset: 2, next: SecureRandom.uuid) end.to raise_error(/cannot use offset with next or sort parameters/) end xit 'search for messages with sorting' do text = SecureRandom.uuid message_ids = ["0-#{text}", "1-#{text}"] - @channel.send_message({ id: message_ids[0], text: text }, 'legolas') - @channel.send_message({ id: message_ids[1], text: text }, 'legolas') - page1 = @client.search({ members: { '$in' => ['legolas'] } }, text, sort: [{ created_at: -1 }], limit: 1) + @channel.send_message({ id: message_ids[0], text: text }, @legolas) + @channel.send_message({ id: message_ids[1], text: text }, @legolas) + page1 = @client.search({ members: { '$in' => [@legolas] } }, text, sort: [{ created_at: -1 }], limit: 1) expect(page1['results'].length).to eq expect(page1['results'][0]['message']['id']).to eq(message_ids[1]) expect(page1['next']).not_to be_empty - page2 = @client.search({ members: { '$in' => ['legolas'] } }, text, limit: 1, next: page1['next']) + page2 = @client.search({ members: { '$in' => [@legolas] } }, text, limit: 1, next: page1['next']) expect(page2['results'].length).to eq(1) expect(page2['results'][0]['message']['id']).to eq(message_ids[0]) expect(page2['previous']).not_to be_empty @@ -837,7 +843,7 @@ def loop_times(times) it 'check push notification test are working' do message_id = SecureRandom.uuid - @channel.send_message({ id: message_id, text: SecureRandom.uuid }, 'legolas') + @channel.send_message({ id: message_id, text: SecureRandom.uuid }, @legolas) resp = @client.check_push({ message_id: message_id, skip_devices: true, user_id: @random_user[:id] }) expect(resp['rendered_message']).not_to be_empty end @@ -867,7 +873,7 @@ def loop_times(times) it 'can translate a message' do message_id = SecureRandom.uuid - @channel.send_message({ id: message_id, text: SecureRandom.uuid }, 'legolas') + @channel.send_message({ id: message_id, text: SecureRandom.uuid }, @legolas) response = @client.translate_message(message_id, 'hu') expect(response['message']).not_to be_empty end @@ -1129,10 +1135,6 @@ def loop_times(times) @message_id = @message['message']['id'] end - after(:all) do - @channel.update_partial({ config_overrides: { user_message_reminders: false } }) - end - describe 'create_reminder' do it 'create reminder' do remind_at = DateTime.now + 1 diff --git a/spec/moderation_spec.rb b/spec/moderation_spec.rb index 0679e96..ec7faf1 100644 --- a/spec/moderation_spec.rb +++ b/spec/moderation_spec.rb @@ -31,6 +31,11 @@ def loop_times(times) { id: SecureRandom.uuid, name: 'Gandalf the Grey', race: 'Istari' }, { id: SecureRandom.uuid, name: 'Legolas', race: 'Elf', age: 500 } ] + @gandalf = @fellowship_of_the_ring[2] + @frodo = @fellowship_of_the_ring[0] + @sam = @fellowship_of_the_ring[1] + @legolas = @fellowship_of_the_ring[3] + @client.upsert_users(@fellowship_of_the_ring) # Create a new channel for moderation