1
0
Fork 0

Add feature "Account"

This commit is contained in:
Alex Kotov 2019-03-24 18:59:47 +05:00
parent 27a6c17f1f
commit 5702c77bb5
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
2 changed files with 20 additions and 0 deletions

View 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 :)"

View 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