Changes tests for new texts
This commit is contained in:
@@ -8,8 +8,8 @@ describe PagesController do
|
|||||||
expect(response).to be_ok
|
expect(response).to be_ok
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should include a legal page' do
|
it 'should include a conditions page' do
|
||||||
get :legal
|
get :conditions
|
||||||
expect(response).to be_ok
|
expect(response).to be_ok
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ feature 'Debates' do
|
|||||||
fill_in 'debate_captcha', with: correct_captcha_text
|
fill_in 'debate_captcha', with: correct_captcha_text
|
||||||
check 'debate_terms_of_service'
|
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 'Debate was successfully created.'
|
||||||
expect(page).to have_content 'Acabar con los desahucios'
|
expect(page).to have_content 'Acabar con los desahucios'
|
||||||
@@ -78,13 +78,13 @@ feature 'Debates' do
|
|||||||
fill_in 'debate_captcha', with: "wrongText!"
|
fill_in 'debate_captcha', with: "wrongText!"
|
||||||
check 'debate_terms_of_service'
|
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_not have_content "Debate was successfully created."
|
||||||
expect(page).to have_content "1 error"
|
expect(page).to have_content "1 error"
|
||||||
|
|
||||||
fill_in 'debate_captcha', with: correct_captcha_text
|
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."
|
expect(page).to have_content "Debate was successfully created."
|
||||||
end
|
end
|
||||||
@@ -100,7 +100,7 @@ feature 'Debates' do
|
|||||||
fill_in 'debate_captcha', with: correct_captcha_text
|
fill_in 'debate_captcha', with: correct_captcha_text
|
||||||
check 'debate_terms_of_service'
|
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_not have_content "Debate was successfully created."
|
||||||
expect(page).to have_content "1 error"
|
expect(page).to have_content "1 error"
|
||||||
@@ -115,7 +115,7 @@ feature 'Debates' do
|
|||||||
login_as(author)
|
login_as(author)
|
||||||
|
|
||||||
visit new_debate_path
|
visit new_debate_path
|
||||||
click_button 'Create Debate'
|
click_button 'Start a debate'
|
||||||
expect(page).to have_content error_message
|
expect(page).to have_content error_message
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@ feature 'Debates' do
|
|||||||
fill_in 'debate_captcha', with: correct_captcha_text
|
fill_in 'debate_captcha', with: correct_captcha_text
|
||||||
check 'debate_terms_of_service'
|
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 'Debate was successfully created.'
|
||||||
expect(page).to have_content 'A test'
|
expect(page).to have_content 'A test'
|
||||||
@@ -161,7 +161,7 @@ feature 'Debates' do
|
|||||||
find('.js-add-tag-link', text: tag_name).click
|
find('.js-add-tag-link', text: tag_name).click
|
||||||
end
|
end
|
||||||
|
|
||||||
click_button 'Create Debate'
|
click_button 'Start a debate'
|
||||||
|
|
||||||
expect(page).to have_content 'Debate was successfully created.'
|
expect(page).to have_content 'Debate was successfully created.'
|
||||||
['Medio Ambiente', 'Ciencia'].each do |tag_name|
|
['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, <script>alert("hey");</script>'
|
fill_in 'debate_tag_list', with: 'user_id=1, &a=3, <script>alert("hey");</script>'
|
||||||
|
|
||||||
click_button 'Create Debate'
|
click_button 'Start a debate'
|
||||||
|
|
||||||
expect(page).to have_content 'Debate was successfully created.'
|
expect(page).to have_content 'Debate was successfully created.'
|
||||||
expect(page).to have_content 'user_id1'
|
expect(page).to have_content 'user_id1'
|
||||||
@@ -222,7 +222,7 @@ feature 'Debates' do
|
|||||||
fill_in 'debate_description', with: "Let's..."
|
fill_in 'debate_description', with: "Let's..."
|
||||||
fill_in 'debate_captcha', with: correct_captcha_text
|
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 "Debate was successfully updated."
|
||||||
expect(page).to have_content "End child poverty"
|
expect(page).to have_content "End child poverty"
|
||||||
@@ -235,7 +235,7 @@ feature 'Debates' do
|
|||||||
|
|
||||||
visit edit_debate_path(debate)
|
visit edit_debate_path(debate)
|
||||||
fill_in 'debate_title', with: ""
|
fill_in 'debate_title', with: ""
|
||||||
click_button 'Update Debate'
|
click_button 'Start a debate'
|
||||||
|
|
||||||
expect(page).to have_content error_message
|
expect(page).to have_content error_message
|
||||||
end
|
end
|
||||||
@@ -249,13 +249,13 @@ feature 'Debates' do
|
|||||||
|
|
||||||
fill_in 'debate_title', with: "New title"
|
fill_in 'debate_title', with: "New title"
|
||||||
fill_in 'debate_captcha', with: "wrong!"
|
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_not have_content "Debate was successfully updated."
|
||||||
expect(page).to have_content "1 error"
|
expect(page).to have_content "1 error"
|
||||||
|
|
||||||
fill_in 'debate_captcha', with: correct_captcha_text
|
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 "Debate was successfully updated."
|
||||||
end
|
end
|
||||||
@@ -271,7 +271,7 @@ feature 'Debates' do
|
|||||||
|
|
||||||
fill_in 'debate_title', with: ""
|
fill_in 'debate_title', with: ""
|
||||||
fill_in 'debate_captcha', with: correct_captcha_text
|
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_not have_content "Debate was successfully updated."
|
||||||
expect(page).to have_content "1 error"
|
expect(page).to have_content "1 error"
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ 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 'Create Debate'
|
click_button 'Start a debate'
|
||||||
|
|
||||||
expect(page).to have_content 'Debate was successfully created.'
|
expect(page).to have_content 'Debate was successfully created.'
|
||||||
expect(page).to have_content 'Economía'
|
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_tag_list', with: "Economía, Hacienda"
|
||||||
fill_in 'debate_captcha', with: correct_captcha_text
|
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 'Debate was successfully updated.'
|
||||||
within('.tags') do
|
within('.tags') do
|
||||||
@@ -107,7 +107,7 @@ feature 'Tags' do
|
|||||||
|
|
||||||
fill_in 'debate_tag_list', with: ""
|
fill_in 'debate_tag_list', with: ""
|
||||||
fill_in 'debate_captcha', with: correct_captcha_text
|
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 'Debate was successfully updated.'
|
||||||
expect(page).to_not have_content 'Economía'
|
expect(page).to_not have_content 'Economía'
|
||||||
|
|||||||
Reference in New Issue
Block a user