From fca3a4de378e3b05acefdc1c45deee2a0061e04d Mon Sep 17 00:00:00 2001 From: Alberto Garcia Cabeza Date: Thu, 3 Sep 2015 00:10:07 +0200 Subject: [PATCH] Changes tests for new texts --- spec/controllers/pages_controller_spec.rb | 4 ++-- spec/features/debates_spec.rb | 26 +++++++++++------------ spec/features/tags_spec.rb | 6 +++--- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/spec/controllers/pages_controller_spec.rb b/spec/controllers/pages_controller_spec.rb index e85b7c54d..760e57ce6 100644 --- a/spec/controllers/pages_controller_spec.rb +++ b/spec/controllers/pages_controller_spec.rb @@ -8,8 +8,8 @@ describe PagesController do expect(response).to be_ok end - it 'should include a legal page' do - get :legal + it 'should include a conditions page' do + get :conditions expect(response).to be_ok end diff --git a/spec/features/debates_spec.rb b/spec/features/debates_spec.rb index f6e07b844..1cd8c6069 100644 --- a/spec/features/debates_spec.rb +++ b/spec/features/debates_spec.rb @@ -60,7 +60,7 @@ feature 'Debates' do fill_in 'debate_captcha', with: correct_captcha_text check 'debate_terms_of_service' - click_button 'Create Debate' + click_button 'Start a debate' expect(page).to have_content 'Debate was successfully created.' expect(page).to have_content 'Acabar con los desahucios' @@ -78,13 +78,13 @@ feature 'Debates' do fill_in 'debate_captcha', with: "wrongText!" check 'debate_terms_of_service' - click_button "Create Debate" + click_button "Start a debate" expect(page).to_not have_content "Debate was successfully created." expect(page).to have_content "1 error" fill_in 'debate_captcha', with: correct_captcha_text - click_button "Create Debate" + click_button "Start a debate" expect(page).to have_content "Debate was successfully created." end @@ -100,7 +100,7 @@ feature 'Debates' do fill_in 'debate_captcha', with: correct_captcha_text check 'debate_terms_of_service' - click_button "Create Debate" + click_button "Start a debate" expect(page).to_not have_content "Debate was successfully created." expect(page).to have_content "1 error" @@ -115,7 +115,7 @@ feature 'Debates' do login_as(author) visit new_debate_path - click_button 'Create Debate' + click_button 'Start a debate' expect(page).to have_content error_message end @@ -129,7 +129,7 @@ feature 'Debates' do fill_in 'debate_captcha', with: correct_captcha_text check 'debate_terms_of_service' - click_button 'Create Debate' + click_button 'Start a debate' expect(page).to have_content 'Debate was successfully created.' expect(page).to have_content 'A test' @@ -161,7 +161,7 @@ feature 'Debates' do find('.js-add-tag-link', text: tag_name).click end - click_button 'Create Debate' + click_button 'Start a debate' expect(page).to have_content 'Debate was successfully created.' ['Medio Ambiente', 'Ciencia'].each do |tag_name| @@ -179,7 +179,7 @@ feature 'Debates' do fill_in 'debate_tag_list', with: 'user_id=1, &a=3, ' - click_button 'Create Debate' + click_button 'Start a debate' expect(page).to have_content 'Debate was successfully created.' expect(page).to have_content 'user_id1' @@ -222,7 +222,7 @@ feature 'Debates' do fill_in 'debate_description', with: "Let's..." fill_in 'debate_captcha', with: correct_captcha_text - click_button "Update Debate" + click_button "Start a debate" expect(page).to have_content "Debate was successfully updated." expect(page).to have_content "End child poverty" @@ -235,7 +235,7 @@ feature 'Debates' do visit edit_debate_path(debate) fill_in 'debate_title', with: "" - click_button 'Update Debate' + click_button 'Start a debate' expect(page).to have_content error_message end @@ -249,13 +249,13 @@ feature 'Debates' do fill_in 'debate_title', with: "New title" fill_in 'debate_captcha', with: "wrong!" - click_button "Update Debate" + click_button "Start a debate" expect(page).to_not have_content "Debate was successfully updated." expect(page).to have_content "1 error" fill_in 'debate_captcha', with: correct_captcha_text - click_button "Update Debate" + click_button "Start a debate" expect(page).to have_content "Debate was successfully updated." end @@ -271,7 +271,7 @@ feature 'Debates' do fill_in 'debate_title', with: "" fill_in 'debate_captcha', with: correct_captcha_text - click_button "Update Debate" + click_button "Start a debate" expect(page).to_not have_content "Debate was successfully updated." expect(page).to have_content "1 error" diff --git a/spec/features/tags_spec.rb b/spec/features/tags_spec.rb index d6c1eba8b..80106cf3b 100644 --- a/spec/features/tags_spec.rb +++ b/spec/features/tags_spec.rb @@ -72,7 +72,7 @@ feature 'Tags' do fill_in 'debate_tag_list', with: "Impuestos, Economía, Hacienda" - click_button 'Create Debate' + click_button 'Start a debate' expect(page).to have_content 'Debate was successfully created.' expect(page).to have_content 'Economía' @@ -90,7 +90,7 @@ feature 'Tags' do fill_in 'debate_tag_list', with: "Economía, Hacienda" fill_in 'debate_captcha', with: correct_captcha_text - click_button 'Update Debate' + click_button 'Start a debate' expect(page).to have_content 'Debate was successfully updated.' within('.tags') do @@ -107,7 +107,7 @@ feature 'Tags' do fill_in 'debate_tag_list', with: "" fill_in 'debate_captcha', with: correct_captcha_text - click_button 'Update Debate' + click_button 'Start a debate' expect(page).to have_content 'Debate was successfully updated.' expect(page).to_not have_content 'Economía'