Skip to content

Commit

Permalink
add assertion to make sure the saved tag text is correct
Browse files Browse the repository at this point in the history
  • Loading branch information
vasconsaurus committed Sep 27, 2024
1 parent f9c0cca commit f29ee76
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/models/tag_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,12 @@ def setup
pm = create_project_media project: project
Tag.create_project_media_tags(pm.id, ['one', 'one', '#one'].to_json)

assert_equal 1, pm.reload.annotations('tag').count
tags = pm.reload.annotations('tag')
tag_text_id = tags.last.data['tag']
tag_text = TagText.find(tag_text_id).text

assert_equal 1, tags.count
assert_equal 'one', tag_text
end

test ":create_project_media_tags should be able to add an existing tag to a new project media" do
Expand Down

0 comments on commit f29ee76

Please sign in to comment.