Skip to content

Commit dcf2b06

Browse files
added more cleanup
1 parent 57c6edd commit dcf2b06

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

spec/client_spec.rb

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ def loop_times(times)
5151
end
5252

5353
after(:all) do
54+
@channel.delete
55+
5456
@users_to_delete = @created_users.dup + @fellowship_of_the_ring.map { |fellow| fellow[:id] }
5557
curr_idx = 0
5658
batch_size = 25
@@ -63,11 +65,6 @@ def loop_times(times)
6365
curr_idx += batch_size
6466
slice = @users_to_delete.slice(curr_idx, batch_size)
6567
end
66-
67-
@channel.delete
68-
rescue StreamChat::StreamAPIException
69-
# if the channel is already deleted by the test, we can ignore the error
70-
logger.info "Error cleaning up testcase: #{e.message}"
7168
end
7269

7370
it 'properly sets up a new client' do

spec/moderation_spec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ def loop_times(times)
5151
end
5252

5353
after(:all) do
54+
@channel.delete
55+
5456
curr_idx = 0
5557
batch_size = 25
5658

@@ -65,7 +67,6 @@ def loop_times(times)
6567
slice = @users_to_delete.slice(curr_idx, batch_size)
6668
end
6769

68-
@channel.delete
6970
end
7071

7172
it 'properly sets up a new client' do

0 commit comments

Comments
 (0)