Add scenario "Account of a supporter"
This commit is contained in:
parent
360399e08a
commit
896dc273ef
2 changed files with 25 additions and 0 deletions
|
@ -9,6 +9,17 @@ Feature: Account
|
||||||
And I see text "Alex Kotov"
|
And I see text "Alex Kotov"
|
||||||
And I see text "Hi there :)"
|
And I see text "Hi there :)"
|
||||||
|
|
||||||
|
Scenario: of a supporter
|
||||||
|
Given there is a supporter 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"
|
||||||
|
And I see text "Hi there :)"
|
||||||
|
|
||||||
Scenario: of a member
|
Scenario: of a member
|
||||||
Given there is a member account with the following data:
|
Given there is a member account with the following data:
|
||||||
| username | kotovalexarian |
|
| username | kotovalexarian |
|
||||||
|
|
|
@ -9,6 +9,20 @@ When 'there is a usual account with the following data:' do |table|
|
||||||
biography: options[:biography]
|
biography: options[:biography]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
When 'there is a supporter 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 :supporter_person, regional_office: regional_office
|
||||||
|
|
||||||
|
create :personal_account,
|
||||||
|
username: options[:username],
|
||||||
|
public_name: options[:public_name],
|
||||||
|
biography: options[:biography],
|
||||||
|
person: person
|
||||||
|
end
|
||||||
|
|
||||||
When 'there is a member 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
|
options = table.raw.map { |(k, v)| [k.to_sym, v] }.to_h
|
||||||
|
|
||||||
|
|
Reference in a new issue