diff --git a/app/views/debates/show.html.erb b/app/views/debates/show.html.erb index d1e05d702..1c48ea214 100644 --- a/app/views/debates/show.html.erb +++ b/app/views/debates/show.html.erb @@ -13,11 +13,11 @@ <% end %>

<%= @debate.title %>

- -
- <%= t("debates.show.flag") %> -
- + <% if @debate.conflictive? %> +
+ <%= t("debates.show.flag") %> +
+ <% end %>
<%= avatar_image(@debate.author, seed: @debate.author_id, size: 32, class: 'author-photo') %> diff --git a/spec/features/debates_spec.rb b/spec/features/debates_spec.rb index 07d055ed2..1c8cdf6cc 100644 --- a/spec/features/debates_spec.rb +++ b/spec/features/debates_spec.rb @@ -453,4 +453,15 @@ feature 'Debates' do expect(page).to_not have_content(debate3.title) end end + + scenario 'Conflictive' do + good_debate = create(:debate) + conflictive_debate = create(:debate, :conflictive) + + visit debate_path(conflictive_debate) + expect(page).to have_content "This debate has been flag as innapropiate for some users." + + visit debate_path(good_debate) + expect(page).to_not have_content "This debate has been flag as innapropiate for some users." + end end