diff --git a/app/controllers/debates_controller.rb b/app/controllers/debates_controller.rb index c1fa928a7..41814ab48 100644 --- a/app/controllers/debates_controller.rb +++ b/app/controllers/debates_controller.rb @@ -25,7 +25,7 @@ class DebatesController < ApplicationController @debate = Debate.new(debate_params) @debate.author = current_user if verify_captcha? and @debate.save - redirect_to @debate, notice: t('flash.actions.create.notice') + redirect_to @debate, notice: t('flash.actions.create.notice', resource_name: 'Debate') else render :new end diff --git a/app/views/shared/_tags.html.erb b/app/views/shared/_tags.html.erb index 990c0d41f..2537e274b 100644 --- a/app/views/shared/_tags.html.erb +++ b/app/views/shared/_tags.html.erb @@ -1,3 +1,5 @@ <% if debate.tags.any? %> - Temas: <%= tags(debate) %> +
<% end %> \ No newline at end of file diff --git a/spec/features/tags_spec.rb b/spec/features/tags_spec.rb index 5df827f52..4be725c7a 100644 --- a/spec/features/tags_spec.rb +++ b/spec/features/tags_spec.rb @@ -80,7 +80,11 @@ feature 'Tags' do click_button 'Actualizar Debate' expect(page).to have_content 'Debate actualizado correctamente' - expect(page).to have_content 'Temas: EconomÃa, Hacienda' + within('#tags') do + expect(page).to have_content 'Temas:' + expect(page).to have_css('a', text: 'EconomÃa') + expect(page).to have_css('a', text: 'Hacienda') + end end scenario 'Delete' do