Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
beccapearce committed Feb 5, 2024
1 parent 3d0586d commit 66dcfb6
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 659 deletions.
6 changes: 0 additions & 6 deletions app/controllers/admin/editions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,6 @@ def save_and_publish
flash[:alert] = @edition.errors.full_messages.join(", ")
end

# PublishRequest.create!(
# request_id: govuk_request_id,
# edition_id: @edition.id,
# country_slug: @edition.country_slug,
# )

redirect_to admin_country_path(@edition.country_slug), notice: "#{@edition.title} published."
else
flash[:alert] = "We had some problems publishing: #{@edition.errors.full_messages.join(', ')}."
Expand Down
43 changes: 0 additions & 43 deletions app/lib/publication_check/content_store_check.rb

This file was deleted.

44 changes: 0 additions & 44 deletions app/lib/publication_check/result.rb

This file was deleted.

19 changes: 0 additions & 19 deletions app/lib/publication_check/runner.rb

This file was deleted.

57 changes: 0 additions & 57 deletions app/models/publish_request.rb

This file was deleted.

8 changes: 0 additions & 8 deletions lib/tasks/publication_checks.rake

This file was deleted.

46 changes: 0 additions & 46 deletions spec/controllers/admin/editions_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -225,52 +225,6 @@

expect(PublishingApiWorker.jobs.size).to eq(1)
end

# it "creates a PublishRequest for that edition" do
# request_id = "123456"
# allow(GdsApi::GovukHeaders).to receive(:headers).and_return(govuk_request_id: request_id)
# post :update, params: { id: draft.to_param, edition: {}, commit: "Save & Publish" }
# publish_request = PublishRequest.last
# expect(publish_request.edition_id).to eq(draft.id)
# expect(publish_request.request_id).to eq(request_id)
# end

# context "when this is the first edition for the country" do
# it "creates a PublishRequest for the email signup page" do
# Sidekiq::Worker.clear_all

# post :update, params: { id: draft.to_param, edition: {}, commit: "Save & Publish" }

# expect(PublishingApiWorker.jobs.size).to eq(1)
# actions = PublishingApiWorker.jobs[0]["args"][0]
# expect(actions.count).to eq(6)
# signup_email = actions.detect do |_, _, details|
# details["base_path"] == "/foreign-travel-advice/aruba/email-signup"
# end
# expect(signup_email).not_to be_nil
# end
# end

# context "when previous edition exist for the country" do
# before do
# create(:published_travel_advice_edition, country_slug: "aruba")
# draft.update!(version_number: 2)
# end

# it "doesn't create a PublishRequest for the email signup page" do
# Sidekiq::Worker.clear_all

# post :update, params: { id: draft.to_param, edition: {}, commit: "Save & Publish" }

# expect(PublishingApiWorker.jobs.size).to eq(1)
# actions = PublishingApiWorker.jobs[0]["args"][0]
# expect(actions.count).to eq(4)
# signup_email = actions.detect do |_, _, details|
# details["base_path"] == "/foreign-travel-advice/aruba/email-signup"
# end
# expect(signup_email).to be_nil
# end
# end
end
end

Expand Down
89 changes: 0 additions & 89 deletions spec/lib/publication_check/content_store_check_spec.rb

This file was deleted.

Loading

0 comments on commit 66dcfb6

Please sign in to comment.