Sha256: 6516bb564398f795e194f7b522ea5bb290b384f951ce510df54f27d95da2c17e
Contents?: true
Size: 1.04 KB
Versions: 3
Compression:
Stored size: 1.04 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) Factory(:account_membership, :user => user, :account => project.account, :admin => true) Factory(:project_membership, :user => user, :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(:account_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
3 entries across 3 versions & 1 rubygems