2019-03-24 09:59:47 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-03-24 14:01:59 -04:00
|
|
|
When 'there is a usual account with the following data:' do |table|
|
|
|
|
options = table.raw.map { |(k, v)| [k.to_sym, v] }.to_h
|
|
|
|
|
|
|
|
create :usual_account,
|
2019-04-28 09:34:46 -04:00
|
|
|
nickname: options[:nickname],
|
2019-03-24 14:01:59 -04:00
|
|
|
public_name: options[:public_name],
|
2019-04-28 09:34:46 -04:00
|
|
|
biography: options[:biography]
|
2019-03-24 14:01:59 -04:00
|
|
|
end
|
|
|
|
|
2019-08-11 16:11:59 -04:00
|
|
|
When 'there is a superuser account with the following data:' do |table|
|
|
|
|
options = table.raw.map { |(k, v)| [k.to_sym, v] }.to_h
|
|
|
|
|
|
|
|
create :superuser_account,
|
|
|
|
nickname: options[:nickname],
|
|
|
|
public_name: options[:public_name],
|
|
|
|
biography: options[:biography]
|
|
|
|
end
|
|
|
|
|
2019-03-24 14:12:17 -04:00
|
|
|
When 'there is a supporter account with the following data:' do |table|
|
|
|
|
options = table.raw.map { |(k, v)| [k.to_sym, v] }.to_h
|
|
|
|
|
2019-06-23 12:07:51 -04:00
|
|
|
federal_subject =
|
|
|
|
create :federal_subject, english_name: options[:federal_subject]
|
2019-06-23 11:59:44 -04:00
|
|
|
regional_office = create :regional_office, federal_subject: federal_subject
|
2019-03-24 14:12:17 -04:00
|
|
|
person = create :supporter_person, regional_office: regional_office
|
|
|
|
|
|
|
|
create :personal_account,
|
2019-04-28 09:34:46 -04:00
|
|
|
nickname: options[:nickname],
|
2019-03-24 14:12:17 -04:00
|
|
|
public_name: options[:public_name],
|
2019-04-28 09:34:46 -04:00
|
|
|
biography: options[:biography],
|
|
|
|
person: person
|
2019-03-24 14:12:17 -04:00
|
|
|
end
|
|
|
|
|
2019-03-24 13:59:37 -04:00
|
|
|
When 'there is a member account with the following data:' do |table|
|
2019-03-24 09:59:47 -04:00
|
|
|
options = table.raw.map { |(k, v)| [k.to_sym, v] }.to_h
|
|
|
|
|
2019-06-23 12:07:51 -04:00
|
|
|
federal_subject =
|
|
|
|
create :federal_subject, english_name: options[:federal_subject]
|
2019-06-23 11:59:44 -04:00
|
|
|
regional_office = create :regional_office, federal_subject: federal_subject
|
2019-03-24 13:59:37 -04:00
|
|
|
person = create :member_person, regional_office: regional_office
|
|
|
|
|
2019-03-24 09:59:47 -04:00
|
|
|
create :personal_account,
|
2019-04-28 09:34:46 -04:00
|
|
|
nickname: options[:nickname],
|
2019-03-24 09:59:47 -04:00
|
|
|
public_name: options[:public_name],
|
2019-04-28 09:34:46 -04:00
|
|
|
biography: options[:biography],
|
|
|
|
person: person
|
2019-03-24 09:59:47 -04:00
|
|
|
end
|
2019-03-24 14:47:55 -04:00
|
|
|
|
|
|
|
When 'there is an excluded member account with the following data:' do |table|
|
|
|
|
options = table.raw.map { |(k, v)| [k.to_sym, v] }.to_h
|
|
|
|
|
2019-06-23 12:07:51 -04:00
|
|
|
federal_subject =
|
|
|
|
create :federal_subject, english_name: options[:federal_subject]
|
2019-06-23 11:59:44 -04:00
|
|
|
regional_office = create :regional_office, federal_subject: federal_subject
|
2019-03-24 14:47:55 -04:00
|
|
|
person = create :excluded_person, regional_office: regional_office
|
|
|
|
|
|
|
|
create :personal_account,
|
2019-04-28 09:34:46 -04:00
|
|
|
nickname: options[:nickname],
|
2019-03-24 14:47:55 -04:00
|
|
|
public_name: options[:public_name],
|
2019-04-28 09:34:46 -04:00
|
|
|
biography: options[:biography],
|
|
|
|
person: person
|
2019-03-24 14:47:55 -04:00
|
|
|
end
|
2019-08-14 23:58:02 -04:00
|
|
|
|
|
|
|
When 'there is a federal manager account with the following data:' do |table|
|
|
|
|
options = table.raw.map { |(k, v)| [k.to_sym, v] }.to_h
|
|
|
|
|
|
|
|
federal_subject =
|
|
|
|
create :federal_subject, english_name: options[:federal_subject]
|
|
|
|
regional_office = create :regional_office, federal_subject: federal_subject
|
|
|
|
person = create :federal_manager_person, regional_office: regional_office
|
|
|
|
|
|
|
|
create :personal_account,
|
|
|
|
nickname: options[:nickname],
|
|
|
|
public_name: options[:public_name],
|
|
|
|
biography: options[:biography],
|
|
|
|
person: person
|
|
|
|
end
|