Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion app/controllers/works_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions features/works/work_edit_tags.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading