[PostVersions] Fix display of unchanged locked tags

2352bf54f6 (r139054663)
This commit is contained in:
Earlopain 2024-02-26 12:48:58 +01:00
parent e1e4b94a50
commit e0b52c13af
No known key found for this signature in database
GPG Key ID: 298A57787DC6EF08
2 changed files with 3 additions and 3 deletions

View File

@ -52,7 +52,7 @@ module PostVersionsHelper
diff[:removed_locked_tags].each do |tag_name|
changes << tag.del(link_to("-#{tag_name}", posts_path(tags: tag_name)))
end
diff[:unchanged_locked_tags].each do |tag|
diff[:unchanged_locked_tags].each do |tag_name|
changes << tag.span(link_to(tag_name, posts_path(tags: tag_name)))
end

View File

@ -13,10 +13,10 @@ class PostVersionsControllerTest < ActionDispatch::IntegrationTest
as(@user) do
@post = create(:post)
travel_to(2.hours.from_now) do
@post.update(tag_string: "1 2", source: "xxx")
@post.update(tag_string: "1 2", source: "xxx\nyyy", locked_tags: "4 5")
end
travel_to(4.hours.from_now) do
@post.update(tag_string: "2 3", rating: "e")
@post.update(tag_string: "2 3", rating: "e", source: "yyy\nzzz", locked_tags: "5 6")
end
@versions = @post.versions
@post2 = create(:post)