Skip to content

Commit

Permalink
Fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
caiosba committed Jan 24, 2024
1 parent 2a4d6f9 commit 4b5505d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/models/bot/alegre_v2_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -652,20 +652,20 @@ def teardown
end

test "should not relate project media for audio if disabled on workspace" do
tbi = @team.team_bot_installations.select{ |x| x.user_id == @bot.id }
tbi = TeamBotInstallation.where(team: @team, user: @bot).last
tbi.set_audio_similarity_enabled = false
tbi.save!
Bot::Alegre.stubs(:merge_suggested_and_confirmed).never
pm = create_project_media team: @team, media: create_uploaded_audio
assert_equal {}, Bot::Alegre.get_similar_items_v2(pm)
assert_equal({}, Bot::Alegre.get_similar_items_v2(pm, nil))
end

test "should not relate project media for image if disabled on workspace" do
tbi = @team.team_bot_installations.select{ |x| x.user_id == @bot.id }
tbi = TeamBotInstallation.where(team: @team, user: @bot).last
tbi.set_image_similarity_enabled = false
tbi.save!
Bot::Alegre.stubs(:merge_suggested_and_confirmed).never
pm = create_project_media team: @team, media: create_uploaded_image
assert_equal {}, Bot::Alegre.get_similar_items_v2(pm)
assert_equal({}, Bot::Alegre.get_similar_items_v2(pm, nil))
end
end
end

0 comments on commit 4b5505d

Please sign in to comment.