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
2 changes: 2 additions & 0 deletions app/controllers/works_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,8 @@ def update_tags
@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
15 changes: 15 additions & 0 deletions features/works/work_edit_tags.feature
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,21 @@ 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"
When I am on imit's works page
Then I should see "Drafts (1)"
When I follow "Drafts (1)"
Then I should see "Freeze Tag"
And I should see "Edit Tags" within "#main .own.work.blurb .actions"
When I follow "Edit Tags"
Then I should see "Post"
When 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