fixing specs

This commit is contained in:
rgarcia
2015-07-22 20:55:12 +02:00
committed by Juanjo Bazán
parent 382028b7b6
commit 23fc19f4b0
3 changed files with 9 additions and 3 deletions

View File

@@ -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

View File

@@ -1,3 +1,5 @@
<% if debate.tags.any? %>
Temas: <%= tags(debate) %>
<div id='tags'>
Temas: <%= tags(debate) %>
</div>
<% end %>

View File

@@ -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