Skip to content

Commit 94ab406

Browse files
authored
[CHA-1630] Remove tests for updating restricted visibility
Removed tests for updating messages with restricted visibility.
1 parent a7cdd5b commit 94ab406

File tree

1 file changed

+0
-67
lines changed

1 file changed

+0
-67
lines changed

spec/channel_spec.rb

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -375,73 +375,6 @@ def loop_times(times)
375375
expect(msg['message']['restricted_visibility']).to match_array([@random_users[0][:id], @random_users[1][:id]])
376376
end
377377

378-
it 'can update message with restricted visibility' do
379-
# Add users as members before testing restricted visibility
380-
@channel.add_members([@random_users[0][:id], @random_users[1][:id]])
381-
382-
# First send a regular message
383-
msg = @channel.send_message(
384-
{
385-
'text' => 'original message'
386-
},
387-
@random_user[:id]
388-
)
389-
390-
# Update the message with restricted visibility
391-
updated_msg = @client.update_message(
392-
{
393-
'id' => msg['message']['id'],
394-
'text' => 'updated secret message',
395-
'restricted_visibility' => [@random_users[0][:id], @random_users[1][:id]],
396-
'user' => { 'id' => @random_user[:id] }
397-
}
398-
)
399-
400-
# Verify the message was updated successfully
401-
expect(updated_msg).to include 'message'
402-
expect(updated_msg['message']['text']).to eq 'updated secret message'
403-
404-
# Verify the restricted visibility
405-
expect(updated_msg['message']['restricted_visibility']).to match_array([@random_users[0][:id], @random_users[1][:id]])
406-
end
407-
408-
it 'can update message partially with restricted visibility' do
409-
# Add users as members before testing restricted visibility
410-
@channel.add_members([@random_users[0][:id], @random_users[1][:id]])
411-
412-
# First send a regular message
413-
msg = @channel.send_message(
414-
{
415-
'text' => 'original message',
416-
'custom_field' => 'original value'
417-
},
418-
@random_user[:id]
419-
)
420-
421-
# Partially update the message with restricted visibility
422-
updated_msg = @client.update_message_partial(
423-
msg['message']['id'],
424-
{
425-
set: {
426-
text: 'partially updated secret message',
427-
restricted_visibility: [@random_users[0][:id], @random_users[1][:id]]
428-
},
429-
unset: ['custom_field']
430-
},
431-
user_id: @random_user[:id]
432-
)
433-
434-
# Verify the message was updated successfully
435-
expect(updated_msg).to include 'message'
436-
expect(updated_msg['message']['text']).to eq 'partially updated secret message'
437-
438-
# Verify the restricted visibility was set
439-
expect(updated_msg['message']['restricted_visibility']).to match_array([@random_users[0][:id], @random_users[1][:id]])
440-
441-
# Verify the custom field was unset
442-
expect(updated_msg['message']).not_to include 'custom_field'
443-
end
444-
445378
it 'can create draft message' do
446379
draft_message = { 'text' => 'This is a draft message' }
447380
response = @channel.create_draft(draft_message, @random_user[:id])

0 commit comments

Comments
 (0)