Skip to content
This repository has been archived by the owner on Aug 12, 2018. It is now read-only.

Commit

Permalink
brought back the original scenario (failing)
Browse files Browse the repository at this point in the history
  • Loading branch information
inoryy committed Jan 29, 2013
1 parent 28ff755 commit b49653d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
8 changes: 8 additions & 0 deletions features/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,12 @@ public function iShouldSeeInResultsTable($text)
{
return new Then(sprintf('I should see "%s" in the "#search_results table td.name" element', $text));
}

/**
* @Given /^there is "([^"]*)" car entry in the database$/
*/
public function thereIsCarEntryInTheDatabase($carName)
{
$this->app['db']->executeUpdate('INSERT INTO cars (name) VALUES (?)', array($carName));
}
}
10 changes: 9 additions & 1 deletion features/search_bar.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,12 @@ Scenario: No results for "mustang" search
And I am on homepage
When I fill in "Car Name" with "mustang"
And I press "Search"
Then I should see "Sorry, no cars found"
Then I should see "Sorry, no cars found"

Scenario: Search results for "mustang"
Given there are no car entries in the database
And there is "Ford Mustang GT500" car entry in the database
And I am on homepage
When I fill in "Car Name" with "mustang"
And I press "Search"
Then I should see "Ford Mustang GT500" in results table

0 comments on commit b49653d

Please sign in to comment.