Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
DGaffney committed Sep 21, 2023
1 parent 23ff0ec commit 7a8537c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/models/bot/alegre_3_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -611,10 +611,9 @@ def self.extract_project_medias_from_context(search_result)
]
}.with_indifferent_access)
Bot::Alegre.stubs(:media_file_url).with(pm3).returns(@media_path)
request = OpenStruct.new(params: { 'action' => 'audio', 'data' => {'requested' => {'body' => {'context' => {'project_media_id' => pm3.id} }}}})
assert_difference 'Relationship.count' do
Bot::Alegre.webhook(request)
end
redis = Redis.new(REDIS_CONFIG)
request = OpenStruct.new(params: { 'action' => 'audio', 'data' => {'requested' => {'body' => {'id' => 'foo', 'context' => {'project_media_id' => pm3.id} }}}})
assert redis.lpop('foo').nil?, false
Bot::Alegre.unstub(:media_file_url)
end
end

0 comments on commit 7a8537c

Please sign in to comment.