From 353612139eca53830ed062ac8612cc03b36a9a11 Mon Sep 17 00:00:00 2001 From: manu vasconcelos Date: Thu, 5 Sep 2024 17:07:41 -0300 Subject: [PATCH] update tests --- test/models/project_media_8_test.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/test/models/project_media_8_test.rb b/test/models/project_media_8_test.rb index c33e1060e..c938035cb 100644 --- a/test/models/project_media_8_test.rb +++ b/test/models/project_media_8_test.rb @@ -14,8 +14,7 @@ def setup assert_nothing_raised do ProjectMedia.create_tags_in_background(project_media_id: pm.id, tags_json: ['one', 'two'].to_json) end - assert_equal pm.id, Tag.last.annotated_id - assert_equal 'two', Tag.last.tag_text + assert_equal 2, pm.annotations('tag').count end test "does not raise an error when no project media is sent" do @@ -30,10 +29,9 @@ def setup t = create_team p = create_project team: t + pm = create_project_media project: p, tags: ['one'] - assert_nothing_raised do - create_project_media project: p, tags: ['one'] - end + assert_equal 1, pm.annotations('tag').count end test "when creating an item with multiple tags, only one job should be scheduled" do