Skip to content

Commit

Permalink
Merge pull request #9638 from alphagov/republish-editions-after-updat…
Browse files Browse the repository at this point in the history
…ing-access

Republish documents after updating access limits
  • Loading branch information
richardTowers authored Nov 21, 2024
2 parents bf2662e + 72c7cc3 commit 14abc3c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/admin/edition_access_limited_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def update
render :edit
else
@edition.save!
PublishingApiDocumentRepublishingWorker.perform_async(@edition.document_id)

EditorialRemark.create!(
edition: @edition,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ class Admin::EditionAccessLimitedControllerTest < ActionController::TestCase
supporting_organisations: [second_organisation],
)

PublishingApiDocumentRepublishingWorker.expects(:perform_async).with(edition.document_id)

editorial_remark = "Updating the organisations at the users request."

put :update,
Expand Down

0 comments on commit 14abc3c

Please sign in to comment.