makes test suite default to :en locale

ref: #38
This commit is contained in:
Juanjo Bazán
2015-07-28 12:50:50 +02:00
parent 9c2a13d16d
commit 9073037a45
6 changed files with 18 additions and 16 deletions

View File

@@ -36,9 +36,9 @@ feature 'Debates' do
fill_in 'debate_description', with: 'Esto es un tema muy importante porque...' fill_in 'debate_description', with: 'Esto es un tema muy importante porque...'
check 'debate_terms_of_service' 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 'Acabar con los desahucios'
expect(page).to have_content 'Esto es un tema muy importante porque...' expect(page).to have_content 'Esto es un tema muy importante porque...'
expect(page).to have_content "Por #{author.name}" 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_title', with: 'Dimisión Rajoy'
fill_in 'debate_description', with: 'Podríamos...' 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 'Dimisión Rajoy'
expect(page).to have_content 'Podríamos...' expect(page).to have_content 'Podríamos...'
end end

View File

@@ -64,9 +64,9 @@ feature 'Tags' do
fill_in 'debate_tag_list', with: "Impuestos, Economía, Hacienda" 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' expect(page).to have_content 'Economía, Hacienda, Impuestos'
end end
@@ -79,9 +79,9 @@ feature 'Tags' do
expect(page).to have_selector("input[value='Economía']") expect(page).to have_selector("input[value='Economía']")
fill_in 'debate_tag_list', with: "Economía, Hacienda" 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 within('.tags') do
expect(page).to have_css('a', text: 'Economía') expect(page).to have_css('a', text: 'Economía')
expect(page).to have_css('a', text: 'Hacienda') expect(page).to have_css('a', text: 'Hacienda')
@@ -95,9 +95,9 @@ feature 'Tags' do
visit edit_debate_path(debate) visit edit_debate_path(debate)
fill_in 'debate_tag_list', with: "" 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' expect(page).to_not have_content 'Economía'
end end

View File

@@ -14,7 +14,7 @@ feature 'Users' do
click_button 'Registrarse' click_button 'Registrarse'
expect(page).to have_content '¡Bienvenido! Has sido identificado.' expect(page).to have_content 'Welcome! You have signed up successfully.'
end end
scenario 'Sign in' do scenario 'Sign in' do
@@ -26,7 +26,7 @@ feature 'Users' do
fill_in 'user_password', with: 'judgementday' fill_in 'user_password', with: 'judgementday'
click_button 'Entrar' click_button 'Entrar'
expect(page).to have_content 'Has iniciado sesión correctamente.' expect(page).to have_content 'Signed in successfully.'
end end
scenario 'Sign out' do scenario 'Sign out' do
@@ -36,7 +36,7 @@ feature 'Users' do
visit "/" visit "/"
click_link 'Salir' click_link 'Salir'
expect(page).to have_content 'Has cerrado la sesión correctamente.' expect(page).to have_content 'Signed out successfully.'
end end
end end

View File

@@ -8,6 +8,8 @@ require 'capybara/rails'
require 'capybara/rspec' require 'capybara/rspec'
require 'capybara/poltergeist' require 'capybara/poltergeist'
I18n.default_locale = :en
include Warden::Test::Helpers include Warden::Test::Helpers
Warden.test_mode! Warden.test_mode!