diff --git a/app/controllers/chapters_controller.rb b/app/controllers/chapters_controller.rb index a8cea0a5972..070d2f07d46 100644 --- a/app/controllers/chapters_controller.rb +++ b/app/controllers/chapters_controller.rb @@ -152,6 +152,7 @@ def update render :preview else @chapter.posted = true if params[:post_button] || params[:post_without_preview_button] + @work.posted = true if @chapter.posted? posted_changed = @chapter.posted_changed? @work.set_revised_at_by_chapter(@chapter) if @chapter.save && @work.save diff --git a/spec/controllers/chapters_controller_spec.rb b/spec/controllers/chapters_controller_spec.rb index 5da5b55e4d4..ae2fd67d269 100644 --- a/spec/controllers/chapters_controller_spec.rb +++ b/spec/controllers/chapters_controller_spec.rb @@ -783,7 +783,6 @@ end it "posts the work if the work was not posted before" do - pending "multi-chapter works should post when chapter is posted" put :update, params: { work_id: unposted_work.id, id: unposted_work.chapters.first.id, chapter: chapter_attributes, post_button: true } expect(assigns[:work].posted).to be true end