Allow only YouTube/Vimeo URLs on 'video_url' attribute
Fixes #1841 On branch aperez-valid-video-url Changes to be committed: modified: app/models/proposal.rb modified: spec/factories.rb modified: spec/models/proposal_spec.rb Allow only YouTube/Vimeo URLs on 'video_url' attribute Fixes #1841 On branch aperez-valid-video-url Changes to be committed: modified: app/helpers/embed_videos_helper.rb modified: app/models/proposal.rb modified: spec/features/management/proposals_spec.rb modified: spec/features/proposals_spec.rb modified: spec/features/tags/proposals_spec.rb modified: spec/models/proposal_spec.rb
This commit is contained in:
@@ -151,7 +151,7 @@ feature 'Proposals' do
|
||||
fill_in 'proposal_summary', with: 'In summary, what we want is...'
|
||||
fill_in 'proposal_description', with: 'This is very important because...'
|
||||
fill_in 'proposal_external_url', with: 'http://rescue.org/refugees'
|
||||
fill_in 'proposal_video_url', with: 'http://youtube.com'
|
||||
fill_in 'proposal_video_url', with: 'https://www.youtube.com/watch?v=yPQfcG-eimk'
|
||||
fill_in 'proposal_responsible_name', with: 'Isabel Garcia'
|
||||
fill_in 'proposal_tag_list', with: 'Refugees, Solidarity'
|
||||
check 'proposal_terms_of_service'
|
||||
@@ -169,7 +169,7 @@ feature 'Proposals' do
|
||||
expect(page).to have_content 'In summary, what we want is...'
|
||||
expect(page).to have_content 'This is very important because...'
|
||||
expect(page).to have_content 'http://rescue.org/refugees'
|
||||
expect(page).to have_content 'http://youtube.com'
|
||||
expect(page).to have_content 'https://www.youtube.com/watch?v=yPQfcG-eimk'
|
||||
expect(page).to have_content author.name
|
||||
expect(page).to have_content 'Refugees'
|
||||
expect(page).to have_content 'Solidarity'
|
||||
@@ -187,7 +187,7 @@ feature 'Proposals' do
|
||||
fill_in 'proposal_summary', with: 'In summary, what we want is...'
|
||||
fill_in 'proposal_description', with: 'This is very important because...'
|
||||
fill_in 'proposal_external_url', with: 'http://rescue.org/refugees'
|
||||
fill_in 'proposal_video_url', with: 'http://youtube.com'
|
||||
fill_in 'proposal_video_url', with: 'https://www.youtube.com/watch?v=yPQfcG-eimk'
|
||||
fill_in 'proposal_responsible_name', with: 'Isabel Garcia'
|
||||
fill_in 'proposal_tag_list', with: 'Refugees, Solidarity'
|
||||
check 'proposal_terms_of_service'
|
||||
@@ -393,7 +393,7 @@ feature 'Proposals' do
|
||||
fill_in 'proposal_summary', with: 'In summary, what we want is...'
|
||||
fill_in 'proposal_description', with: 'This is very important because...'
|
||||
fill_in 'proposal_external_url', with: 'http://rescue.org/refugees'
|
||||
fill_in 'proposal_video_url', with: 'http://youtube.com'
|
||||
fill_in 'proposal_video_url', with: 'https://www.youtube.com/watch?v=yPQfcG-eimk'
|
||||
fill_in 'proposal_responsible_name', with: 'Isabel Garcia'
|
||||
check 'proposal_terms_of_service'
|
||||
|
||||
@@ -421,7 +421,7 @@ feature 'Proposals' do
|
||||
fill_in 'proposal_summary', with: 'In summary, what we want is...'
|
||||
fill_in 'proposal_description', with: 'This is very important because...'
|
||||
fill_in 'proposal_external_url', with: 'http://rescue.org/refugees'
|
||||
fill_in 'proposal_video_url', with: 'http://youtube.com'
|
||||
fill_in 'proposal_video_url', with: 'https://www.youtube.com/watch?v=yPQfcG-eimk'
|
||||
fill_in 'proposal_responsible_name', with: 'Isabel Garcia'
|
||||
check 'proposal_terms_of_service'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user