fix #1303. Adding test for it.

This commit is contained in:
Reinier Balt 2012-07-11 16:25:24 +02:00
parent 23b92d853a
commit 48cc8740cb
2 changed files with 16 additions and 0 deletions

View file

@ -100,6 +100,14 @@ Given /^I have a project "([^\"]*)" with (.*) notes?$/ do |project_name, num|
end
end
Given /^the default tags for "(.*?)" are "(.*?)"$/ do |project_name, default_tags|
project = @current_user.projects.find_by_name(project_name)
project.should_not be_nil
project.default_tags = default_tags
project.save!
end
When /^I open the project edit form$/ do
click_link "link_edit_project_#{@project.id}"
page.should have_css("button#submit_project_#{@project.id}", :visible => true)

View file

@ -77,6 +77,14 @@ Feature: Tagging todos
When I submit a new action with description "are my tags prefilled"
Then the tags of "are my tags prefilled" should be "tests"
@javascript
Scenario: Selecting a project with default tags when editing a todo will prefill the tags field
Given I have a todo "tag me" in the context "@pc"
And the default tags for "hacking tracks" are "TagA, TagB"
When I go to the "@pc" context
And I edit the project of "tag me" to "hacking tracks"
Then the tags of "tag me" should be "taga, tagb"
@javascript
Scenario: If there are todos for a tag, when viewing the tag's page, the Tags field for new todos should be defaulted to that tag
Given I have a todo "migrate old scripts" in context "@pc" with tags "starred"