mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-18 08:10:13 +01:00
inspired by the railscasts about cucumber. Also fix a problem with ZenTest on case sensitive platforms
14 lines
No EOL
497 B
Ruby
14 lines
No EOL
497 B
Ruby
Given /^I have logged in as "(.*)" with password "(.*)"$/ do |username, password|
|
|
visit login_path
|
|
fill_in "login", :with => username
|
|
fill_in "password", :with => password
|
|
click_button "Sign in"
|
|
response.body.should =~ /Login successful/m
|
|
@current_user = User.find_by_login(username)
|
|
end
|
|
|
|
When /^I submit the login form as user "([^\"]*)" with password "([^\"]*)"$/ do |username, password|
|
|
fill_in 'Login', :with => username
|
|
fill_in 'Password', :with => password
|
|
click_button
|
|
end |