Escape HTML some factory strings
This commit is contained in:
parent
ad0a8eecf2
commit
45bd31fad0
12 changed files with 21 additions and 22 deletions
|
|
@ -15,7 +15,7 @@ feature Lodging do
|
|||
click_link 'Add Lodging'
|
||||
|
||||
fill_in 'lodging_name', with: 'New lodging'
|
||||
fill_in 'lodging_website_link', with: 'http:\\www.google.com'
|
||||
fill_in 'lodging_website_link', with: 'http://www.google.com'
|
||||
attach_file 'Picture', path
|
||||
|
||||
click_button 'Create Lodging'
|
||||
|
|
@ -35,7 +35,7 @@ feature Lodging do
|
|||
visit admin_conference_lodgings_path(
|
||||
conference_id: conference.short_title)
|
||||
|
||||
expect(page.has_content?(lodging.name)).to be true
|
||||
expect(page.has_content?(CGI.escapeHTML(lodging.name))).to be true
|
||||
|
||||
# Add lodging
|
||||
click_link 'Edit'
|
||||
|
|
@ -51,7 +51,7 @@ feature Lodging do
|
|||
expect(page.has_content?('New lodging')).to be true
|
||||
lodging.reload
|
||||
expect(lodging.name).to eq('New lodging')
|
||||
expect(lodging.description).to eq(lodging.description)
|
||||
expect(lodging.description).to eq(CGI.escapeHTML(lodging.description))
|
||||
expect(lodging.website_link).to eq('http://www.google.com')
|
||||
expect(Lodging.count).to eq(1)
|
||||
end
|
||||
|
|
@ -70,7 +70,7 @@ feature Lodging do
|
|||
|
||||
# Validations
|
||||
expect(flash).to eq('Lodging successfully deleted.')
|
||||
expect(page.has_content?(lodging.name)).to be false
|
||||
expect(page.has_content?(CGI.escapeHTML(lodging.name))).to be false
|
||||
expect(Lodging.count).to eq(0)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue