Skip to content

Commit

Permalink
Add feature for seeing the list of inquiries when one exists.
Browse files Browse the repository at this point in the history
  • Loading branch information
parndt committed Jul 26, 2010
1 parent 98f02f1 commit e1cb006
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions features/refinery/manage_inquiries.feature
Expand Up @@ -5,3 +5,9 @@ Feature: Manage Inquiries

Background:
Given I am a logged in user

Scenario: Inquiries List
Given I have an inquiry from "David Jones" with email "dave@refinerycms.com" and message "Hello, I really like your website. Was it hard to build and maintain or could anyone do it?"
When I go to the list of inquiries
Then I should see "David Jones said Hello, I really like your website. Was it hard to build ..."
And I should have 1 inquiries
6 changes: 6 additions & 0 deletions features/step_definitions/refinery/inquiry_steps.rb
Expand Up @@ -4,4 +4,10 @@

Then /^I should have ([0-9]+) inquiries?$/ do |count|
Inquiry.count.should == count.to_i
end

Given /^I have an inquiry from "([^"]*)" with email "([^"]*)" and message "([^"]*)"$/ do |name, email, message|
Inquiry.create(:name => name,
:email => email,
:message => message)
end
3 changes: 3 additions & 0 deletions features/support/paths.rb
Expand Up @@ -25,6 +25,9 @@ def path_to(page_name)

when /the contact create page/
inquiries_path

when /the list of inquiries/
admin_inquiries_path

# Add more mappings here.
# Here is an example that pulls values out of the Regexp:
Expand Down

0 comments on commit e1cb006

Please sign in to comment.