Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Given 'admin has already signed up' do
- @user = User.new(:login => 'admin', :name => 'admin', :email => 'edgemerb@gmail.com', :password => '5555')
- @user.password_confirmation = '5555'
- @user.save!
- visit "/ativate/#{@user.activation_code}"
- @user.set_role("admin")
- @user.activated_at = Time.now
- @user.save!
- @response = visit "/"
- end
- When /^I login as "(.*)" with "(.*)"$/ do |name, pass|
- visit "/"
- click_link "Sign in"
- fill_in "Login", :with => "#{name}"
- fill_in "Password", :with => "#{pass}"
- #session.user = User.first(:login => "#{name}")
- @response = click_button("Log in")
- end
- Given /^I logged in as Admin$/ do
- Given "admin has already signed up"
- visit "/"
- click_link "Sign in"
- fill_in "Login", :with => "admin"
- fill_in "Password", :with => "5555"
- click_button("Log in")
- end
Add Comment
Please, Sign In to add comment