1
0
Fork 0

Specify regional office of a tested account

This commit is contained in:
Alex Kotov 2019-03-24 22:59:37 +05:00
parent 4512082343
commit 96d138dc0c
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
2 changed files with 10 additions and 4 deletions

View file

@ -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"

View file

@ -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