diff --git a/test/models/bot/smooch_test.rb b/test/models/bot/smooch_test.rb index f82515454..e4cd2c828 100644 --- a/test/models/bot/smooch_test.rb +++ b/test/models/bot/smooch_test.rb @@ -231,45 +231,43 @@ def teardown assert_difference 'ProjectMedia.count', 7 do assert_difference 'TiplineRequest.count', 22 do - assert_no_difference 'Comment.length' do - messages.each do |message| - uid = message[:authorId] - - message = { - trigger: 'message:appUser', - app: { - '_id': @app_id - }, - version: 'v1.1', - messages: [message], - appUser: { - '_id': uid, - 'conversationStarted': true - } - }.to_json - - ignore = { - trigger: 'message:appUser', - app: { - '_id': @app_id - }, - version: 'v1.1', - messages: [ - { - '_id': random_string, - authorId: uid, - type: 'text', - text: '2' - } - ], - appUser: { - '_id': uid, - 'conversationStarted': true + messages.each do |message| + uid = message[:authorId] + + message = { + trigger: 'message:appUser', + app: { + '_id': @app_id + }, + version: 'v1.1', + messages: [message], + appUser: { + '_id': uid, + 'conversationStarted': true + } + }.to_json + + ignore = { + trigger: 'message:appUser', + app: { + '_id': @app_id + }, + version: 'v1.1', + messages: [ + { + '_id': random_string, + authorId: uid, + type: 'text', + text: '2' } - }.to_json + ], + appUser: { + '_id': uid, + 'conversationStarted': true + } + }.to_json - assert Bot::Smooch.run(message) - end + assert Bot::Smooch.run(message) end end end diff --git a/test/models/project_media_5_test.rb b/test/models/project_media_5_test.rb index 57506c268..b1bdc69fa 100644 --- a/test/models/project_media_5_test.rb +++ b/test/models/project_media_5_test.rb @@ -920,9 +920,6 @@ def setup new_tt.response = { annotation_type: 'task_response_single_choice', set_fields: { response_task: 'Foo' }.to_json }.to_json new_tt.save! new_tt2 = new.annotations('task').select{|t| t.team_task_id == tt2.id}.last - # add comments - old_t = create_tag annotated: old - new_t = create_tag annotated: new # assign to s = new.last_verification_status_obj s = Dynamic.find(s.id) @@ -939,7 +936,6 @@ def setup data = { "main" => CheckChannels::ChannelCodes::FETCH } assert_equal data, new.channel assert_equal 3, new.annotations('tag').count - assert_equal 2, new.annotations('comment').count # Verify replace log entry replace_v = Version.from_partition(new.team_id).where(event_type: 'replace_projectmedia', associated_id: new.id, associated_type: 'ProjectMedia') assert_not_empty replace_v