mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-04 15:01:48 +01:00
Started moving selenium on rails tests over to RSpec stories. See the updated README_DEVELOPERS for info on running the new tests.
This commit is contained in:
parent
85dc6f4898
commit
d47e863dfc
12 changed files with 257 additions and 74 deletions
30
stories/steps/users.rb
Normal file
30
stories/steps/users.rb
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
steps_for :users do
|
||||
|
||||
Given "an admin user Reinier with the password abracadabra" do
|
||||
@reinier = User.create!(:login => 'reinier', :password => 'abracadabra', :password_confirmation => 'abracadabra', :is_admin => true)
|
||||
@reinier.create_preference
|
||||
end
|
||||
|
||||
Given "an admin user Reinier" do
|
||||
Given "an admin user Reinier with the password abracadabra"
|
||||
end
|
||||
|
||||
Given "a logged in user Luis" do
|
||||
@luis = User.create!(:login => 'luis', :password => 'sesame', :password_confirmation => 'sesame', :is_admin => false)
|
||||
@luis.create_preference
|
||||
logged_in_as @luis
|
||||
end
|
||||
|
||||
Given "no users exist" do
|
||||
User.delete_all
|
||||
end
|
||||
|
||||
Given "Reinier is not logged in" do
|
||||
#nothing to do
|
||||
end
|
||||
|
||||
Given "a visitor named Reinier" do
|
||||
#nothing to do
|
||||
end
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue