mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-20 14:14:09 +01:00
add cucumber for integration testing and add a feature for statistics
refactor some stuff to support testing statistisc
This commit is contained in:
parent
058079a0a7
commit
43440eaf33
11 changed files with 286 additions and 5 deletions
9
features/step_definitions/login_steps.rb
Normal file
9
features/step_definitions/login_steps.rb
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
Given /^I am logged in$/ do
|
||||
@current_user = User.create!(:login => "testuser", :password => "secret", :password_confirmation => "secret")
|
||||
@current_user.create_preference
|
||||
visit login_path
|
||||
fill_in "login", :with => "testuser"
|
||||
fill_in "password", :with => "secret"
|
||||
click_button "Sign in"
|
||||
response.body.should =~ /Login successful/m
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue