Created
May 2, 2010 22:11
-
-
Save neaf/387498 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Given 'account with "$email" email and password of "$password" exist' do |email, password| | |
Given "account with \"#{ email }\" email does not exist" | |
Account.create(:email => email, :password => password, :password_confirmation => password) | |
end | |
Given 'inactive account with "$email" email exist' do |email| | |
Given "account with \"#{ email }\" email and password of \"secret\" exist" | |
account = Account.where(:email => email).first | |
account.is_active = false | |
account.save | |
end | |
Given 'active account with "$email" email exist' do |email| | |
Given "account with \"#{ email }\" email and password of \"secret\" exist" | |
account = Account.where(:email => email).first | |
account.is_active = true | |
account.save | |
end | |
Given 'I am logged in as team member' do | |
email = "[email protected]" | |
password = "secret" | |
Given "account with \"#{ email }\" email and password of \"#{ password }\" exist" | |
account = Account.where(:email => email).first | |
account.type = "member" | |
account.save | |
Given "I am logged in with \"#{ email }\" email and password of \"#{ password }\"" | |
end | |
Given 'I am logged in with "$email" email and password of "$password"' do |email, password| | |
visit "/login" | |
fill_in "Email", :with => email | |
fill_in "Password", :with => password | |
click_button "Log in" | |
end | |
When 'I go to login form' do | |
visit "/login" | |
end | |
Then 'I should see "$page_title" page' do |page_title| | |
within("title") do | |
page.should have_content(page_title) | |
end | |
end | |
When 'I go to clients index page' do | |
visit("/clients") | |
end | |
When 'I fill in "$field" field with "$value" in "$form" fieldset' do |field, value, fieldset| | |
within_fieldset(fieldset) do | |
fill_in field, :with => value | |
end | |
end | |
Then 'I should see URL to pass to the client' do | |
page.should have_content("Setup URL:") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment