@@ -948,12 +948,9 @@ def loop_times(times)
948948 end
949949
950950 it 'config test' do
951- newchannel = @client . channel ( 'messaging' , channel_id : 'fellowship-of-the-throne' ,
952- data : { members : @fellowship_of_the_ring . map { |fellow | fellow [ :id ] } } )
953- newchannel . create ( 'tav' )
954951 # Create moderation config
955952 moderation_config = {
956- key : "chat:messaging :#{ newchannel . id } " ,
953+ key : "chat:team :#{ @channel . id } " ,
957954 block_list_config : {
958955 enabled : true ,
959956 rules : [
@@ -965,17 +962,17 @@ def loop_times(times)
965962 }
966963 }
967964 @moderation . upsert_config ( moderation_config )
968- response = @moderation . get_config ( "chat:messaging :#{ newchannel . id } " )
969- expect ( response [ 'config' ] [ 'key' ] ) . to eq ( "chat:messaging :#{ newchannel . id } " )
965+ response = @moderation . get_config ( "chat:team :#{ @channel . id } " )
966+ expect ( response [ 'config' ] [ 'key' ] ) . to eq ( "chat:team :#{ @channel . id } " )
970967
971968 response = @moderation . query_configs (
972- { key : "chat:messaging:#{ newchannel . id } " } ,
969+ { key : "chat:messaging:#{ @channel . id } " } ,
973970 [ ]
974971 )
975972 expect ( response ) . not_to be_nil
976973
977974 # Send message that should be blocked
978- response = newchannel . send_message (
975+ response = @channel . send_message (
979976 { text : 'damn' } ,
980977 @random_user [ :id ] ,
981978 force_moderation : true
@@ -989,7 +986,8 @@ def loop_times(times)
989986 )
990987 expect ( queue_response [ 'items' ] [ 0 ] [ 'entity_id' ] ) . to eq ( response [ 'message' ] [ 'id' ] )
991988
992- @moderation . delete_config ( "chat:messaging:#{ newchannel . id } " )
989+ response = @moderation . delete_config ( "chat:team:#{ @channel . id } " )
990+ expect ( response [ 'duration' ] ) . not_to be_nil
993991 end
994992 end
995993end
0 commit comments