diff --git a/features/desktop/account.feature b/features/desktop/account.feature new file mode 100644 index 0000000..c0771c9 --- /dev/null +++ b/features/desktop/account.feature @@ -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 :)" diff --git a/features/step_definitions/account.rb b/features/step_definitions/account.rb new file mode 100644 index 0000000..0dd78da --- /dev/null +++ b/features/step_definitions/account.rb @@ -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