diff --git a/app/helpers/tags_helper.rb b/app/helpers/tags_helper.rb index 9b9ac87b7c..db9a0e39b1 100644 --- a/app/helpers/tags_helper.rb +++ b/app/helpers/tags_helper.rb @@ -52,7 +52,8 @@ def wrangler_list(wranglers, tag) end def link_to_tag(tag, options = {}) - link_to_tag_with_text(tag, tag.display_name, options) + display_name = tag.errors.key?(:name) ? tag.name_was : tag.display_name + link_to_tag_with_text(tag, display_name, options) end def link_to_tag_works(tag, options = {}) diff --git a/features/tags_and_wrangling/tag_wrangling_special.feature b/features/tags_and_wrangling/tag_wrangling_special.feature index 99ce3e1e7c..5ffc0e3c3f 100644 --- a/features/tags_and_wrangling/tag_wrangling_special.feature +++ b/features/tags_and_wrangling/tag_wrangling_special.feature @@ -39,6 +39,7 @@ Feature: Tag Wrangling - special cases When I fill in "Name" with "Amelia" And I press "Save changes" Then I should see "Name can only be changed by an admin." + And I should see "Edit Amelie Tag" Scenario: Change capitalisation of a tag