Add feature "Account"
This commit is contained in:
parent
27a6c17f1f
commit
5702c77bb5
2 changed files with 20 additions and 0 deletions
10
features/desktop/account.feature
Normal file
10
features/desktop/account.feature
Normal file
|
@ -0,0 +1,10 @@
|
|||
Feature: Account
|
||||
Scenario:
|
||||
Given there is an 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 :)"
|
10
features/step_definitions/account.rb
Normal file
10
features/step_definitions/account.rb
Normal file
|
@ -0,0 +1,10 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
When 'there is an account with the following data:' do |table|
|
||||
options = table.raw.map { |(k, v)| [k.to_sym, v] }.to_h
|
||||
|
||||
create :personal_account,
|
||||
username: options[:username],
|
||||
public_name: options[:public_name],
|
||||
biography: options[:biography]
|
||||
end
|
Reference in a new issue