Sha256: 57256b7935c8466ef7fd5269c8cb4683380407012f0414c438938835653ea0f9

Contents?: true

Size: 1.41 KB

Versions: 15

Compression:

Stored size: 1.41 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(: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 "([^"]*)" under the "([^"]*)" account$/ do |email, account_name|
  account = Factory(:account, :name => account_name)
  user    = Factory(:user, :email => email)
  membership = Factory(:membership, :user => user, :account => account)
  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(: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')
  When %{I sign in as "#{email}/test"}
end

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

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
saasy-0.0.2.alpha3 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saasy-0.0.2.alpha2 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saasy-0.0.2.alpha1 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.9.1 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.9.0 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.8.5 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.8.4 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.8.3 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saasy-0.0.1 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.8.2 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.8.1 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.8.0 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.7.3 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.7.2 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.7.1 lib/generators/saucy/features/templates/step_definitions/session_steps.rb