Sha256: 8bd63c5524e416e1f2f2281427e5a3cccfb03f4ac0c28d85950134c2fdbc945a

Contents?: true

Size: 1.19 KB

Versions: 6

Compression:

Stored size: 1.19 KB

Contents

Given /^I (?:am signed in|sign in) as an admin of the "([^"]+)" project$/ do |project_name|
  project = Project.find_by_name!(project_name)
  user    = Factory(:email_confirmed_user)
  membership = Factory(:membership, :user    => user,
                                                    :account => project.account,
                                                    :admin   => true)
  Factory(:permission, :membership => membership,
                               :project            => project)
  When %{I sign in as "#{user.email}"}
end

Given /^I am signed in as an admin of the "([^"]*)" account$/ do |account_name|
  account = Account.find_by_name!(account_name)
  user    = Factory(:email_confirmed_user)
  Factory(:membership, :user    => user,
                               :account => account,
                               :admin   => true)
  When %{I sign in as "#{user.email}"}
end

When /^I sign in as "([^"\/]*)"$/ do |email|
  user = User.find_by_email!(email)
  user.update_attributes!(:password => 'test', :password_confirmation => 'test')
  When %{I sign in as "#{email}/test"}
end

Given /^I am signed in$/ do
  user = Factory(:email_confirmed_user)
  When %{I sign in as "#{user.email}"}
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
saucy-0.1.9 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.1.8 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.1.7 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.1.6 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.1.5 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.1.4 lib/generators/saucy/features/templates/step_definitions/session_steps.rb