diff --git a/app/models/archived/debate_outcome.rb b/app/models/archived/debate_outcome.rb index 9ea5af22b..84cc129a5 100644 --- a/app/models/archived/debate_outcome.rb +++ b/app/models/archived/debate_outcome.rb @@ -4,18 +4,36 @@ module Archived class DebateOutcome < ActiveRecord::Base VALID_OTHER_URLS = /\Ahttps?:\/\/(?:[a-z][\-\.a-z0-9]{0,63}\.parliament\.uk|www\.youtube\.com).*\z/ VALID_VIDEO_URLS = /\Ahttps?:\/\/(?:(?:www\.)?parliamentlive\.tv|www\.youtube\.com).*\z/ + VALID_PUBLIC_ENGAGEMENT_URLS = /\Ahttps?:\/\/(?:committees\.parliament\.uk|ukparliament\.shorthandstories\.com).*\z/ + VALID_DEBATE_SUMMARY_URLS = /\Ahttps?:\/\/ukparliament\.shorthandstories\.com.*\z/ belongs_to :petition, touch: true validates :petition, presence: true validates :debated_on, presence: true, if: :debated? - validates :transcript_url, :video_url, :debate_pack_url, :public_engagement_url, :debate_summary_url, length: { maximum: 500 } - validates :debate_pack_url, format: { with: VALID_OTHER_URLS }, allow_blank: true - validates :transcript_url, format: { with: VALID_OTHER_URLS }, allow_blank: true - validates :video_url, format: { with: VALID_VIDEO_URLS }, allow_blank: true - validates :public_engagement_url, format: { with: VALID_OTHER_URLS }, allow_blank: true - validates :debate_summary_url, format: { with: VALID_OTHER_URLS }, allow_blank: true + with_options length: { maximum: 500 } do + validates :transcript_url, :video_url, :debate_pack_url + validates :public_engagement_url, :debate_summary_url + end + + with_options allow_blank: true do + with_options format: { with: VALID_OTHER_URLS } do + validates :debate_pack_url, :transcript_url + end + + with_options format: { with: VALID_VIDEO_URLS } do + validates :video_url + end + + with_options format: { with: VALID_PUBLIC_ENGAGEMENT_URLS } do + validates :public_engagement_url + end + + with_options format: { with: VALID_DEBATE_SUMMARY_URLS } do + validates :debate_summary_url + end + end has_one_attached :image diff --git a/app/models/debate_outcome.rb b/app/models/debate_outcome.rb index 423c99b6e..13269e0ac 100644 --- a/app/models/debate_outcome.rb +++ b/app/models/debate_outcome.rb @@ -1,18 +1,36 @@ class DebateOutcome < ActiveRecord::Base VALID_OTHER_URLS = /\Ahttps?:\/\/(?:[a-z][\-\.a-z0-9]{0,63}\.parliament\.uk|www\.youtube\.com).*\z/ VALID_VIDEO_URLS = /\Ahttps?:\/\/(?:(?:www\.)?parliamentlive\.tv|www\.youtube\.com).*\z/ + VALID_PUBLIC_ENGAGEMENT_URLS = /\Ahttps?:\/\/(?:committees\.parliament\.uk|ukparliament\.shorthandstories\.com).*\z/ + VALID_DEBATE_SUMMARY_URLS = /\Ahttps?:\/\/ukparliament\.shorthandstories\.com.*\z/ belongs_to :petition, touch: true validates :petition, presence: true validates :debated_on, presence: true, if: :debated? - validates :transcript_url, :video_url, :debate_pack_url, :public_engagement_url, :debate_summary_url, length: { maximum: 500 } - validates :debate_pack_url, format: { with: VALID_OTHER_URLS }, allow_blank: true - validates :transcript_url, format: { with: VALID_OTHER_URLS }, allow_blank: true - validates :video_url, format: { with: VALID_VIDEO_URLS }, allow_blank: true - validates :public_engagement_url, format: { with: VALID_OTHER_URLS }, allow_blank: true - validates :debate_summary_url, format: { with: VALID_OTHER_URLS }, allow_blank: true + with_options length: { maximum: 500 } do + validates :transcript_url, :video_url, :debate_pack_url + validates :public_engagement_url, :debate_summary_url + end + + with_options allow_blank: true do + with_options format: { with: VALID_OTHER_URLS } do + validates :debate_pack_url, :transcript_url + end + + with_options format: { with: VALID_VIDEO_URLS } do + validates :video_url + end + + with_options format: { with: VALID_PUBLIC_ENGAGEMENT_URLS } do + validates :public_engagement_url + end + + with_options format: { with: VALID_DEBATE_SUMMARY_URLS } do + validates :debate_summary_url + end + end has_one_attached :image diff --git a/config/locales/activerecord.en-GB.yml b/config/locales/activerecord.en-GB.yml index 98182fca4..967450341 100644 --- a/config/locales/activerecord.en-GB.yml +++ b/config/locales/activerecord.en-GB.yml @@ -63,9 +63,9 @@ en-GB: video_url: invalid: "Please use a url on the parliamentlive.tv website or www.youtube.com" public_engagement_url: - invalid: "Please use a url on the parliament.uk website or a subdomain" + invalid: "Please use a url on the committees.parliament.uk or ukparliament.shorthandstories.com websites" debate_summary_url: - invalid: "Please use a url on the parliament.uk website or a subdomain" + invalid: "Please use a url on the ukparliament.shorthandstories.com website" archived/petition: attributes: parliament: @@ -159,9 +159,9 @@ en-GB: video_url: invalid: "Please use a url on the parliamentlive.tv website or www.youtube.com" public_engagement_url: - invalid: "Please use a url on the parliament.uk website or a subdomain" + invalid: "Please use a url on the committees.parliament.uk or ukparliament.shorthandstories.com websites" debate_summary_url: - invalid: "Please use a url on the parliament.uk website or a subdomain" + invalid: "Please use a url on the ukparliament.shorthandstories.com website" rate_limit: attributes: diff --git a/features/step_definitions/actioned_steps.rb b/features/step_definitions/actioned_steps.rb index 35965c5ab..a4897f2e0 100644 --- a/features/step_definitions/actioned_steps.rb +++ b/features/step_definitions/actioned_steps.rb @@ -10,16 +10,16 @@ transcript_url = "https://hansard.parliament.uk/path/to/transcript" elsif links_command == " with a debate pack url" debate_pack_url = "https://researchbriefings.parliament.uk/path/to/briefing" + elsif links_command == " with a public engagement url" + public_engagement_url = "https://committees.parliament.uk/public-engagement" elsif links_command == " with a debate summary url" - public_engagement_url = "https://www.parliament.uk/public-engagement" - elsif links_command == " with a debate summary url" - debate_summary_url = "https://www.parliament.uk/summary-debates" + debate_summary_url = "https://ukparliament.shorthandstories.com/about-a-petition" elsif links_command == " with all debate outcome urls" video_url = "https://www.youtube.com/watch?v=1234abcd" transcript_url = "https://hansard.parliament.uk/path/to/transcript" debate_pack_url = "https://researchbriefings.parliament.uk/path/to/briefing" - public_engagement_url = "https://www.parliament.uk/public-engagement" - debate_summary_url = "https://www.parliament.uk/summary-debates" + public_engagement_url = "https://committees.parliament.uk/public-engagement" + debate_summary_url = "https://ukparliament.shorthandstories.com/about-a-petition" end debated_count.times do |count| diff --git a/features/step_definitions/debate_outcome_steps.rb b/features/step_definitions/debate_outcome_steps.rb index 028221b03..9f11bcbf6 100644 --- a/features/step_definitions/debate_outcome_steps.rb +++ b/features/step_definitions/debate_outcome_steps.rb @@ -6,8 +6,8 @@ transcript_url: 'https://hansard.parliament.uk/path/to/transcript', video_url: 'https://www.youtube.com?v=1234abcd', debate_pack_url: 'https://researchbriefings.parliament.uk/path/to/briefing', - public_engagement_url: "https://www.parliament.uk/public-engagement", - debate_summary_url: "https://www.parliament.uk/summary-debates" + public_engagement_url: "https://committees.parliament.uk/public-engagement", + debate_summary_url: "https://ukparliament.shorthandstories.com/about-a-petition" ) @petition.update(debate_outcome_at: debated_days_ago.days.ago) end @@ -21,8 +21,8 @@ transcript_url: 'https://hansard.parliament.uk/path/to/transcript', video_url: 'https://www.youtube.com?v=1234abcd', debate_pack_url: 'https://researchbriefings.parliament.uk/path/to/briefing', - public_engagement_url: "https://www.parliament.uk/public-engagement", - debate_summary_url: "https://www.parliament.uk/summary-debates" + public_engagement_url: "https://committees.parliament.uk/public-engagement", + debate_summary_url: "https://ukparliament.shorthandstories.com/about-a-petition" ) end @@ -53,8 +53,8 @@ expect(page).to have_link('Watch the debate', href: 'https://www.youtube.com?v=1234abcd') expect(page).to have_link('Read the transcript', href: 'https://hansard.parliament.uk/path/to/transcript') expect(page).to have_link('Read the research', href: 'https://researchbriefings.parliament.uk/path/to/briefing') - expect(page).to have_link('Read what the public said', href: 'https://www.parliament.uk/public-engagement') - expect(page).to have_link('Read a summary of the debate', href: 'https://www.parliament.uk/summary-debates') + expect(page).to have_link('Read what the public said', href: 'https://committees.parliament.uk/public-engagement') + expect(page).to have_link('Read a summary of the debate', href: 'https://ukparliament.shorthandstories.com/about-a-petition') end end @@ -75,8 +75,8 @@ fill_in 'Transcript URL', with: 'https://hansard.parliament.uk/path/to/transcript' fill_in 'Video URL', with: 'https://www.youtube.com/watch?v=1234abcd' fill_in 'Debate Pack URL', with: 'https://researchbriefings.parliament.uk/path/to/briefing' - fill_in 'Public Engagement URL', with: 'https://www.parliament.uk/public-engagement' - fill_in 'Debate Summary URL', with: 'https://www.parliament.uk/summary-debates' + fill_in 'Public Engagement URL', with: 'https://committees.parliament.uk/public-engagement' + fill_in 'Debate Summary URL', with: 'https://ukparliament.shorthandstories.com/about-a-petition' end Then(/^the petition should have the debate details I provided$/) do @@ -88,8 +88,8 @@ expect(@petition.debate_outcome.transcript_url).to eq 'https://hansard.parliament.uk/path/to/transcript' expect(@petition.debate_outcome.video_url).to eq 'https://www.youtube.com/watch?v=1234abcd' expect(@petition.debate_outcome.debate_pack_url).to eq 'https://researchbriefings.parliament.uk/path/to/briefing' - expect(@petition.debate_outcome.public_engagement_url).to eq "https://www.parliament.uk/public-engagement" - expect(@petition.debate_outcome.debate_summary_url).to eq "https://www.parliament.uk/summary-debates" + expect(@petition.debate_outcome.public_engagement_url).to eq "https://committees.parliament.uk/public-engagement" + expect(@petition.debate_outcome.debate_summary_url).to eq "https://ukparliament.shorthandstories.com/about-a-petition" end Then(/^the petition creator should have been emailed about the debate$/) do diff --git a/spec/controllers/admin/archived/debate_outcomes_controller_spec.rb b/spec/controllers/admin/archived/debate_outcomes_controller_spec.rb index 14c84e9c6..d3ef2417f 100644 --- a/spec/controllers/admin/archived/debate_outcomes_controller_spec.rb +++ b/spec/controllers/admin/archived/debate_outcomes_controller_spec.rb @@ -125,8 +125,8 @@ transcript_url: 'http://www.publications.parliament.uk/pa/cm201415/cmhansrd/cm141218/debtext/141218-0003.htm#14121849000001', video_url: 'http://parliamentlive.tv/event/index/f9eb68af-6a5c-4a94-95d3-6108aa87e9d7?in=13:57:00', debate_pack_url: "http://researchbriefings.parliament.uk/ResearchBriefing/Summary/CDP-2014-1234", - public_engagement_url: "https://www.parliament.uk/public-engagement", - debate_summary_url: "https://www.parliament.uk/summary-debates", + public_engagement_url: "https://committees.parliament.uk/public-engagement", + debate_summary_url: "https://ukparliament.shorthandstories.com/about-a-petition", } end diff --git a/spec/controllers/admin/debate_outcomes_controller_spec.rb b/spec/controllers/admin/debate_outcomes_controller_spec.rb index 303d9180e..27cb00dcf 100644 --- a/spec/controllers/admin/debate_outcomes_controller_spec.rb +++ b/spec/controllers/admin/debate_outcomes_controller_spec.rb @@ -137,8 +137,8 @@ transcript_url: 'http://www.publications.parliament.uk/pa/cm201415/cmhansrd/cm141218/debtext/141218-0003.htm#14121849000001', video_url: 'http://parliamentlive.tv/event/index/f9eb68af-6a5c-4a94-95d3-6108aa87e9d7?in=13:57:00', debate_pack_url: "http://researchbriefings.parliament.uk/ResearchBriefing/Summary/CDP-2014-1234", - public_engagement_url: "https://www.parliament.uk/public-engagement", - debate_summary_url: "https://www.parliament.uk/summary-debates", + public_engagement_url: "https://committees.parliament.uk/public-engagement", + debate_summary_url: "https://ukparliament.shorthandstories.com/about-a-petition", } end diff --git a/spec/factories.rb b/spec/factories.rb index 3e0cb024d..73e56b37e 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -40,10 +40,10 @@ "http://researchbriefings.parliament.uk/ResearchBriefing/Summary/CDP-#{debated_on.strftime('%Y')}-#{ '%04d' % n }" } public_engagement_url { - "https://www.parliament.uk/public-engagement" + "https://committees.parliament.uk/public-engagement" } debate_summary_url { - "https://www.parliament.uk/summary-debates" + "https://ukparliament.shorthandstories.com/about-a-petition" } end end @@ -771,10 +771,10 @@ "http://researchbriefings.parliament.uk/ResearchBriefing/Summary/CDP-#{debated_on.strftime('%Y')}-#{ '%04d' % n }" } public_engagement_url { - "https://www.parliament.uk/public-engagement" + "https://committees.parliament.uk/public-engagement" } debate_summary_url { - "https://www.parliament.uk/summary-debates" + "https://ukparliament.shorthandstories.com/about-a-petition" } end end diff --git a/spec/jobs/archive_petition_job_spec.rb b/spec/jobs/archive_petition_job_spec.rb index 99030804b..ac42beb8d 100644 --- a/spec/jobs/archive_petition_job_spec.rb +++ b/spec/jobs/archive_petition_job_spec.rb @@ -224,8 +224,8 @@ transcript_url: "https://hansard.parliament.uk/commons/2017-04-24/debates/123456/KidsTV", video_url: "http://www.parliamentlive.tv/Event/Index/123456", debate_pack_url: "http://researchbriefings.parliament.uk/ResearchBriefing/Summary/CDP-2015-0001", - public_engagement_url: "https://www.parliament.uk/public-engagement", - debate_summary_url: "https://www.parliament.uk/summary-debates", + public_engagement_url: "https://committees.parliament.uk/public-engagement", + debate_summary_url: "https://ukparliament.shorthandstories.com/about-a-petition", ) end diff --git a/spec/mailers/archived/petition_mailer_spec.rb b/spec/mailers/archived/petition_mailer_spec.rb index 65e63611b..bd9bb697b 100644 --- a/spec/mailers/archived/petition_mailer_spec.rb +++ b/spec/mailers/archived/petition_mailer_spec.rb @@ -297,8 +297,8 @@ transcript_url: "http://www.publications.parliament.uk/pa/cm201509/cmhansrd/cm20150924/debtext/20150924-0003.htm#2015092449#000001", video_url: "http://parliamentlive.tv/event/index/20150924000001", debate_pack_url: "http://researchbriefings.parliament.uk/ResearchBriefing/Summary/CDP-2015-0001", - public_engagement_url: "https://www.parliament.uk/public-engagement", - debate_summary_url: "https://www.parliament.uk/summary-debates", + public_engagement_url: "https://committees.parliament.uk/public-engagement", + debate_summary_url: "https://ukparliament.shorthandstories.com/about-a-petition", ) end diff --git a/spec/mailers/petition_mailer_spec.rb b/spec/mailers/petition_mailer_spec.rb index a8a0ee8df..311a12478 100644 --- a/spec/mailers/petition_mailer_spec.rb +++ b/spec/mailers/petition_mailer_spec.rb @@ -564,8 +564,8 @@ transcript_url: "http://www.publications.parliament.uk/pa/cm201509/cmhansrd/cm20150924/debtext/20150924-0003.htm#2015092449#000001", video_url: "http://parliamentlive.tv/event/index/20150924000001", debate_pack_url: "http://researchbriefings.parliament.uk/ResearchBriefing/Summary/CDP-2015-0001", - public_engagement_url: "https://www.parliament.uk/public-engagement", - debate_summary_url: "https://www.parliament.uk/summary-debates", + public_engagement_url: "https://committees.parliament.uk/public-engagement", + debate_summary_url: "https://ukparliament.shorthandstories.com/about-a-petition", petition: petition, ) end @@ -690,8 +690,8 @@ transcript_url: "http://www.publications.parliament.uk/pa/cm201509/cmhansrd/cm20150924/debtext/20150924-0003.htm#2015092449#000001", video_url: "http://parliamentlive.tv/event/index/20150924000001", debate_pack_url: "http://researchbriefings.parliament.uk/ResearchBriefing/Summary/CDP-2015-0001", - public_engagement_url: "https://www.parliament.uk/public-engagement", - debate_summary_url: "https://www.parliament.uk/summary-debates", + public_engagement_url: "https://committees.parliament.uk/public-engagement", + debate_summary_url: "https://ukparliament.shorthandstories.com/about-a-petition", petition: petition, ) end diff --git a/spec/models/archived/debate_outcome_spec.rb b/spec/models/archived/debate_outcome_spec.rb index f035cfb62..bc1003689 100644 --- a/spec/models/archived/debate_outcome_spec.rb +++ b/spec/models/archived/debate_outcome_spec.rb @@ -40,10 +40,15 @@ it { is_expected.to allow_value("https://hansard.parliament.uk/").for(:transcript_url) } it { is_expected.to allow_value("https://parliamentlive.tv/").for(:video_url) } it { is_expected.to allow_value("https://www.youtube.com/").for(:video_url) } + it { is_expected.to allow_value("https://committees.parliament.uk/").for(:public_engagement_url) } + it { is_expected.to allow_value("https://ukparliament.shorthandstories.com/").for(:public_engagement_url) } + it { is_expected.to allow_value("https://ukparliament.shorthandstories.com/").for(:debate_summary_url) } it { is_expected.not_to allow_value("https://www.example.com/").for(:debate_pack_url) } it { is_expected.not_to allow_value("https://www.example.com/").for(:transcript_url) } it { is_expected.not_to allow_value("https://www.example.com/").for(:video_url) } + it { is_expected.not_to allow_value("https://www.example.com/").for(:public_engagement_url) } + it { is_expected.not_to allow_value("https://www.example.com/").for(:debate_summary_url) } context "when then petition was debated" do subject { described_class.new(debated: true) } diff --git a/spec/models/debate_outcome_spec.rb b/spec/models/debate_outcome_spec.rb index 72b7beb6c..37ad829c9 100644 --- a/spec/models/debate_outcome_spec.rb +++ b/spec/models/debate_outcome_spec.rb @@ -40,10 +40,15 @@ it { is_expected.to allow_value("https://hansard.parliament.uk/").for(:transcript_url) } it { is_expected.to allow_value("https://parliamentlive.tv/").for(:video_url) } it { is_expected.to allow_value("https://www.youtube.com/").for(:video_url) } + it { is_expected.to allow_value("https://committees.parliament.uk/").for(:public_engagement_url) } + it { is_expected.to allow_value("https://ukparliament.shorthandstories.com/").for(:public_engagement_url) } + it { is_expected.to allow_value("https://ukparliament.shorthandstories.com/").for(:debate_summary_url) } it { is_expected.not_to allow_value("https://www.example.com/").for(:debate_pack_url) } it { is_expected.not_to allow_value("https://www.example.com/").for(:transcript_url) } it { is_expected.not_to allow_value("https://www.example.com/").for(:video_url) } + it { is_expected.not_to allow_value("https://www.example.com/").for(:public_engagement_url) } + it { is_expected.not_to allow_value("https://www.example.com/").for(:debate_summary_url) } context "when then petition was debated" do subject { described_class.new(debated: true) } diff --git a/spec/requests/archived_petition_show_spec.rb b/spec/requests/archived_petition_show_spec.rb index ed72f3ebd..bc186f022 100644 --- a/spec/requests/archived_petition_show_spec.rb +++ b/spec/requests/archived_petition_show_spec.rb @@ -171,8 +171,8 @@ transcript_url: "http://www.publications.parliament.uk/pa/cm201212/cmhansrd/cm120313/debtext/120313-0001.htm#12031360000001", video_url: "http://parliamentlive.tv/event/index/da084e18-0e48-4d0a-9aa5-be27f57d5a71?in=16:31:00", debate_pack_url: "http://researchbriefings.parliament.uk/ResearchBriefing/Summary/CDP-2014-1234", - public_engagement_url: "https://www.parliament.uk/public-engagement", - debate_summary_url: "https://www.parliament.uk/summary-debates" + public_engagement_url: "https://committees.parliament.uk/public-engagement", + debate_summary_url: "https://ukparliament.shorthandstories.com/about-a-petition" get "/archived/petitions/#{petition.id}.json" expect(response).to be_successful @@ -186,8 +186,8 @@ "transcript_url" => "http://www.publications.parliament.uk/pa/cm201212/cmhansrd/cm120313/debtext/120313-0001.htm#12031360000001", "video_url" => "http://parliamentlive.tv/event/index/da084e18-0e48-4d0a-9aa5-be27f57d5a71?in=16:31:00", "debate_pack_url" => "http://researchbriefings.parliament.uk/ResearchBriefing/Summary/CDP-2014-1234", - "public_engagement_url" => "https://www.parliament.uk/public-engagement", - "debate_summary_url" => "https://www.parliament.uk/summary-debates", + "public_engagement_url" => "https://committees.parliament.uk/public-engagement", + "debate_summary_url" => "https://ukparliament.shorthandstories.com/about-a-petition", ) ) ) diff --git a/spec/requests/archived_petitions_list_spec.rb b/spec/requests/archived_petitions_list_spec.rb index 59729d25f..85779ec71 100644 --- a/spec/requests/archived_petitions_list_spec.rb +++ b/spec/requests/archived_petitions_list_spec.rb @@ -218,8 +218,8 @@ transcript_url: "http://www.publications.parliament.uk/pa/cm201212/cmhansrd/cm120313/debtext/120313-0001.htm#12031360000001", video_url: "http://parliamentlive.tv/event/index/da084e18-0e48-4d0a-9aa5-be27f57d5a71?in=16:31:00", debate_pack_url: "http://researchbriefings.parliament.uk/ResearchBriefing/Summary/CDP-2014-1234", - public_engagement_url: "https://www.parliament.uk/public-engagement", - debate_summary_url: "https://www.parliament.uk/summary-debates" + public_engagement_url: "https://committees.parliament.uk/public-engagement", + debate_summary_url: "https://ukparliament.shorthandstories.com/about-a-petition" get "/archived/petitions.json" expect(response).to be_successful @@ -234,8 +234,8 @@ "transcript_url" => "http://www.publications.parliament.uk/pa/cm201212/cmhansrd/cm120313/debtext/120313-0001.htm#12031360000001", "video_url" => "http://parliamentlive.tv/event/index/da084e18-0e48-4d0a-9aa5-be27f57d5a71?in=16:31:00", "debate_pack_url" => "http://researchbriefings.parliament.uk/ResearchBriefing/Summary/CDP-2014-1234", - "public_engagement_url" => "https://www.parliament.uk/public-engagement", - "debate_summary_url" => "https://www.parliament.uk/summary-debates", + "public_engagement_url" => "https://committees.parliament.uk/public-engagement", + "debate_summary_url" => "https://ukparliament.shorthandstories.com/about-a-petition", ) ) ) diff --git a/spec/requests/petition_show_spec.rb b/spec/requests/petition_show_spec.rb index d2fe21ce7..4b331ff64 100644 --- a/spec/requests/petition_show_spec.rb +++ b/spec/requests/petition_show_spec.rb @@ -170,8 +170,8 @@ transcript_url: "http://www.publications.parliament.uk/pa/cm201212/cmhansrd/cm120313/debtext/120313-0001.htm#12031360000001", video_url: "http://parliamentlive.tv/event/index/da084e18-0e48-4d0a-9aa5-be27f57d5a71?in=16:31:00", debate_pack_url: "http://researchbriefings.parliament.uk/ResearchBriefing/Summary/CDP-2014-1234", - public_engagement_url: "https://www.parliament.uk/public-engagement", - debate_summary_url: "https://www.parliament.uk/summary-debates" + public_engagement_url: "https://committees.parliament.uk/public-engagement", + debate_summary_url: "https://ukparliament.shorthandstories.com/about-a-petition" get "/petitions/#{petition.id}.json" expect(response).to be_successful @@ -185,8 +185,8 @@ "transcript_url" => "http://www.publications.parliament.uk/pa/cm201212/cmhansrd/cm120313/debtext/120313-0001.htm#12031360000001", "video_url" => "http://parliamentlive.tv/event/index/da084e18-0e48-4d0a-9aa5-be27f57d5a71?in=16:31:00", "debate_pack_url" => "http://researchbriefings.parliament.uk/ResearchBriefing/Summary/CDP-2014-1234", - "public_engagement_url" => "https://www.parliament.uk/public-engagement", - "debate_summary_url" => "https://www.parliament.uk/summary-debates", + "public_engagement_url" => "https://committees.parliament.uk/public-engagement", + "debate_summary_url" => "https://ukparliament.shorthandstories.com/about-a-petition", ) ) ) diff --git a/spec/requests/petitions_list_spec.rb b/spec/requests/petitions_list_spec.rb index 29f3d7e77..77c71ed5f 100644 --- a/spec/requests/petitions_list_spec.rb +++ b/spec/requests/petitions_list_spec.rb @@ -242,8 +242,8 @@ transcript_url: "http://www.publications.parliament.uk/pa/cm201212/cmhansrd/cm120313/debtext/120313-0001.htm#12031360000001", video_url: "http://parliamentlive.tv/event/index/da084e18-0e48-4d0a-9aa5-be27f57d5a71?in=16:31:00", debate_pack_url: "http://researchbriefings.parliament.uk/ResearchBriefing/Summary/CDP-2014-1234", - public_engagement_url: "https://www.parliament.uk/public-engagement", - debate_summary_url: "https://www.parliament.uk/summary-debates" + public_engagement_url: "https://committees.parliament.uk/public-engagement", + debate_summary_url: "https://ukparliament.shorthandstories.com/about-a-petition" get "/petitions.json" expect(response).to be_successful @@ -258,8 +258,8 @@ "transcript_url" => "http://www.publications.parliament.uk/pa/cm201212/cmhansrd/cm120313/debtext/120313-0001.htm#12031360000001", "video_url" => "http://parliamentlive.tv/event/index/da084e18-0e48-4d0a-9aa5-be27f57d5a71?in=16:31:00", "debate_pack_url" => "http://researchbriefings.parliament.uk/ResearchBriefing/Summary/CDP-2014-1234", - "public_engagement_url" => "https://www.parliament.uk/public-engagement", - "debate_summary_url" => "https://www.parliament.uk/summary-debates" + "public_engagement_url" => "https://committees.parliament.uk/public-engagement", + "debate_summary_url" => "https://ukparliament.shorthandstories.com/about-a-petition" ) ) )