@@ -36,9 +36,9 @@ feature 'Debates' do
|
||||
fill_in 'debate_description', with: 'Esto es un tema muy importante porque...'
|
||||
check 'debate_terms_of_service'
|
||||
|
||||
click_button 'Crear Debate'
|
||||
click_button 'Create Debate'
|
||||
|
||||
expect(page).to have_content 'Debate creado correctamente'
|
||||
expect(page).to have_content 'Debate was successfully created.'
|
||||
expect(page).to have_content 'Acabar con los desahucios'
|
||||
expect(page).to have_content 'Esto es un tema muy importante porque...'
|
||||
expect(page).to have_content "Por #{author.name}"
|
||||
@@ -75,9 +75,9 @@ feature 'Debates' do
|
||||
fill_in 'debate_title', with: 'Dimisión Rajoy'
|
||||
fill_in 'debate_description', with: 'Podríamos...'
|
||||
|
||||
click_button 'Actualizar Debate'
|
||||
click_button 'Update Debate'
|
||||
|
||||
expect(page).to have_content 'Debate actualizado correctamente'
|
||||
expect(page).to have_content 'Debate was successfully updated.'
|
||||
expect(page).to have_content 'Dimisión Rajoy'
|
||||
expect(page).to have_content 'Podríamos...'
|
||||
end
|
||||
|
||||
@@ -64,9 +64,9 @@ feature 'Tags' do
|
||||
|
||||
fill_in 'debate_tag_list', with: "Impuestos, Economía, Hacienda"
|
||||
|
||||
click_button 'Crear Debate'
|
||||
click_button 'Create Debate'
|
||||
|
||||
expect(page).to have_content 'Debate creado correctamente'
|
||||
expect(page).to have_content 'Debate was successfully created.'
|
||||
expect(page).to have_content 'Economía, Hacienda, Impuestos'
|
||||
end
|
||||
|
||||
@@ -79,9 +79,9 @@ feature 'Tags' do
|
||||
expect(page).to have_selector("input[value='Economía']")
|
||||
|
||||
fill_in 'debate_tag_list', with: "Economía, Hacienda"
|
||||
click_button 'Actualizar Debate'
|
||||
click_button 'Update Debate'
|
||||
|
||||
expect(page).to have_content 'Debate actualizado correctamente'
|
||||
expect(page).to have_content 'Debate was successfully updated.'
|
||||
within('.tags') do
|
||||
expect(page).to have_css('a', text: 'Economía')
|
||||
expect(page).to have_css('a', text: 'Hacienda')
|
||||
@@ -95,9 +95,9 @@ feature 'Tags' do
|
||||
visit edit_debate_path(debate)
|
||||
|
||||
fill_in 'debate_tag_list', with: ""
|
||||
click_button 'Actualizar Debate'
|
||||
click_button 'Update Debate'
|
||||
|
||||
expect(page).to have_content 'Debate actualizado correctamente'
|
||||
expect(page).to have_content 'Debate was successfully updated.'
|
||||
expect(page).to_not have_content 'Economía'
|
||||
end
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@ feature 'Users' do
|
||||
|
||||
click_button 'Registrarse'
|
||||
|
||||
expect(page).to have_content '¡Bienvenido! Has sido identificado.'
|
||||
expect(page).to have_content 'Welcome! You have signed up successfully.'
|
||||
end
|
||||
|
||||
|
||||
scenario 'Sign in' do
|
||||
user = create(:user, email: 'manuela@madrid.es', password: 'judgementday')
|
||||
|
||||
@@ -25,18 +25,18 @@ feature 'Users' do
|
||||
fill_in 'user_email', with: 'manuela@madrid.es'
|
||||
fill_in 'user_password', with: 'judgementday'
|
||||
click_button 'Entrar'
|
||||
|
||||
expect(page).to have_content 'Has iniciado sesión correctamente.'
|
||||
|
||||
expect(page).to have_content 'Signed in successfully.'
|
||||
end
|
||||
|
||||
scenario 'Sign out' do
|
||||
user = create(:user)
|
||||
login_as(user)
|
||||
|
||||
|
||||
visit "/"
|
||||
click_link 'Salir'
|
||||
|
||||
expect(page).to have_content 'Has cerrado la sesión correctamente.'
|
||||
expect(page).to have_content 'Signed out successfully.'
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -8,6 +8,8 @@ require 'capybara/rails'
|
||||
require 'capybara/rspec'
|
||||
require 'capybara/poltergeist'
|
||||
|
||||
I18n.default_locale = :en
|
||||
|
||||
include Warden::Test::Helpers
|
||||
Warden.test_mode!
|
||||
|
||||
|
||||
Reference in New Issue
Block a user