Add scenario "Account of a user"
This commit is contained in:
parent
96d138dc0c
commit
360399e08a
2 changed files with 19 additions and 0 deletions
|
@ -1,4 +1,14 @@
|
||||||
Feature: Account
|
Feature: Account
|
||||||
|
Scenario: of a user
|
||||||
|
Given there is a usual account with the following data:
|
||||||
|
| username | kotovalexarian |
|
||||||
|
| public_name | Alex Kotov |
|
||||||
|
| biography | Hi there :) |
|
||||||
|
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 |
|
||||||
|
|
|
@ -1,5 +1,14 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
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,
|
||||||
|
username: options[:username],
|
||||||
|
public_name: options[:public_name],
|
||||||
|
biography: options[:biography]
|
||||||
|
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