Skip to content

Commit

Permalink
Added a (not completely implemented) scenario testing the creation of…
Browse files Browse the repository at this point in the history
… pages with the same title.
  • Loading branch information
stevenheidel authored and parndt committed Jun 18, 2010
1 parent f9fc5d7 commit e1b9d43
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
10 changes: 10 additions & 0 deletions features/refinery/manage_pages.feature
Expand Up @@ -28,3 +28,13 @@ Feature: Manage Pages
And I press "Save"
Then I should see "Title can't be blank"
And I should have 0 pages

Scenario: Create Duplicate Page
Given I am a logged in user
And I only have pages titled Home, About
When I go to the list of pages
And I follow "Create New Page"
And I fill in "Title" with "About"
And I press "Save"
Then I should have 3 pages
And I should have a page at "/about--2"
7 changes: 6 additions & 1 deletion features/step_definitions/refinery/page_steps.rb
@@ -1,4 +1,5 @@
Given /^I have pages titled (.+)$/ do |titles|
Given /^I (only )?have pages titled (.+)$/ do |only, titles|
Page.delete_all if only
titles.split(', ').each do |title|
Page.create(:title => title)
end
Expand All @@ -11,3 +12,7 @@
Then /^I should have ([0-9]+) pages?$/ do |count|
Page.count.should == count.to_i
end

Then /^I should have a page at "(.+)"$/ do |url|
true.should == true # TODO
end

0 comments on commit e1b9d43

Please sign in to comment.