FIX: Show Uncategorized when unsubscribing (#13832)
If user tried to unsubscribe from a post from category Uncategorized, the category name was not displayed. It said only "Stop watching all topics in".
This commit is contained in:
parent
ffb3e7b356
commit
6db93e86d4
|
@ -37,7 +37,7 @@
|
||||||
<p>
|
<p>
|
||||||
<label>
|
<label>
|
||||||
<%= check_box_tag 'unwatch_category' %>
|
<%= check_box_tag 'unwatch_category' %>
|
||||||
<%= t('unsubscribe.unwatch_category', category: category_badge(@topic.category)).html_safe %>
|
<%= t('unsubscribe.unwatch_category', category: category_badge(@topic.category, show_uncategorized: true)).html_safe %>
|
||||||
</label>
|
</label>
|
||||||
</p>
|
</p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -273,6 +273,8 @@ RSpec.describe EmailController do
|
||||||
|
|
||||||
navigate_to_unsubscribe
|
navigate_to_unsubscribe
|
||||||
expect(response.body).to include("unwatch_category")
|
expect(response.body).to include("unwatch_category")
|
||||||
|
doc = Nokogiri::HTML5::fragment(response.body)
|
||||||
|
expect(doc.css('a.badge-wrapper[href="/c/uncategorized/1"]').size).to eq(1)
|
||||||
|
|
||||||
cu.destroy!
|
cu.destroy!
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue