diff --git a/app/controllers/works_controller.rb b/app/controllers/works_controller.rb index 61e6ad43a02..de4a6ce992e 100755 --- a/app/controllers/works_controller.rb +++ b/app/controllers/works_controller.rb @@ -401,10 +401,12 @@ def update_tags @work.save flash[:notice] = ts('Tags were successfully updated.') redirect_to(@work) - else # Save Draft + else @work.posted = true @work.minor_version = @work.minor_version + 1 @work.save + @work.word_count = @work.first_chapter.word_count + @work.save flash[:notice] = ts('Work was successfully updated.') redirect_to(@work) end diff --git a/features/works/work_edit_tags.feature b/features/works/work_edit_tags.feature index 73fad2066c1..3d0bfc1c468 100644 --- a/features/works/work_edit_tags.feature +++ b/features/works/work_edit_tags.feature @@ -52,6 +52,16 @@ Feature: Edit tags on a work And I should see "Anthropomorphic" And I should see "The cooler version of tag" + Scenario: See correct word count when posting draft from Edit Tags + Given I am logged in as "imit" with password "tagyoure" + And the draft "Freeze Tag" + And I view the work "Freeze Tag" + When I follow "Edit Tags" + And I press "Post" + Then I should see "Work was successfully updated." + And I should not see "This work is a draft and has not been posted" + And I should see "Words:6" + Scenario: Ampersands and angle brackets should display in work titles on Edit Tags page Given the work "I am <strong>er Than Yesterday & Other Lies" by "testuser2" And I am logged in as "testuser2"