displays alert for conflictive debates
This commit is contained in:
@@ -13,11 +13,11 @@
|
||||
<% end %>
|
||||
|
||||
<h1><%= @debate.title %></h1>
|
||||
<!-- SI HAY 1 DENUNCIA POR CADA 5 VOTOS POSITIVOS MUESTRA ESTE MENSAJE -->
|
||||
<div class="alert-box alert radius margin-top">
|
||||
<strong><%= t("debates.show.flag") %></strong>
|
||||
</div>
|
||||
<!-- /. SI HAY 1 DENUNCIA POR CADA 5 VOTOS POSITIVOS MUESTRA ESTE MENSAJE -->
|
||||
<% if @debate.conflictive? %>
|
||||
<div class="alert-box alert radius margin-top">
|
||||
<strong><%= t("debates.show.flag") %></strong>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="debate-info">
|
||||
<%= avatar_image(@debate.author, seed: @debate.author_id, size: 32, class: 'author-photo') %>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user