Sha256: c5238c244b3b5549a077a48829ff220cbef86c3a05425c6b75a0fea48cc2ec9f

Contents?: true

Size: 1.11 KB

Versions: 3

Compression:

Stored size: 1.11 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 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

3 entries across 3 versions & 1 rubygems

Version Path
saucy-0.7.0 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.6.1 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.6.0 lib/generators/saucy/features/templates/step_definitions/session_steps.rb