fixing specs
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
<% if debate.tags.any? %>
|
||||
Temas: <%= tags(debate) %>
|
||||
<div id='tags'>
|
||||
Temas: <%= tags(debate) %>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user