Skip to content

Commit

Permalink
Remove more referenced to from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jayjay-w committed Feb 19, 2025
1 parent b592f0e commit c0fd6e5
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 41 deletions.
72 changes: 35 additions & 37 deletions test/models/bot/smooch_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions test/models/project_media_5_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit c0fd6e5

Please sign in to comment.