Specify regional office of a tested account
This commit is contained in:
parent
4512082343
commit
96d138dc0c
2 changed files with 10 additions and 4 deletions
|
@ -1,9 +1,10 @@
|
|||
Feature: Account
|
||||
Scenario:
|
||||
Given there is an account with the following data:
|
||||
Scenario: of a member
|
||||
Given there is a member account with the following data:
|
||||
| username | kotovalexarian |
|
||||
| public_name | Alex Kotov |
|
||||
| biography | Hi there :) |
|
||||
| country_state | Москва |
|
||||
When I visit "/accounts/kotovalexarian"
|
||||
Then I see text "kotovalexarian"
|
||||
And I see text "Alex Kotov"
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
When 'there is an account with the following data:' do |table|
|
||||
When 'there is a member account with the following data:' do |table|
|
||||
options = table.raw.map { |(k, v)| [k.to_sym, v] }.to_h
|
||||
|
||||
country_state = create :country_state, name: options[:country_state]
|
||||
regional_office = create :regional_office
|
||||
person = create :member_person, regional_office: regional_office
|
||||
|
||||
create :personal_account,
|
||||
username: options[:username],
|
||||
public_name: options[:public_name],
|
||||
biography: options[:biography]
|
||||
biography: options[:biography],
|
||||
person: person
|
||||
end
|
||||
|
|
Reference in a new issue