Sha256: 297f109725ba7a302b4f1fc8441161aa00eada4ba579609d2be516e2cf97a514

Contents?: true

Size: 1.14 KB

Versions: 77

Compression:

Stored size: 1.14 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', :password_confirmation => '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

77 entries across 77 versions & 1 rubygems

Version Path
saucy-0.5.5 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.5.4 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.5.3 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.5.2 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.5.1 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.5.0 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.4.10 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.4.9 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.2.28.1 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.4.8 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.4.7 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.4.6 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.4.5 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.4.4 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.4.3 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.4.2 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.4.1 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.3.4.1 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.4.0 lib/generators/saucy/features/templates/step_definitions/session_steps.rb
saucy-0.3.4 lib/generators/saucy/features/templates/step_definitions/session_steps.rb