1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
lpr-partynest/features/step_definitions/sign_out.rb

27 lines
640 B
Ruby

# frozen_string_literal: true
Given 'I am signed in with email {string}' do |email|
@user = create :user, email: email
visit '/users/sign_in'
within 'form' do
fill_in 'Email', with: @user.email
fill_in 'Пароль', with: @user.password
click_on 'Войти'
end
expect(page).to have_css 'ul > li > a', text: @user.email
end
When 'I try to sign out' do
click_on @user.email
click_on 'Выйти'
end
Then 'I am successfully signed out' do
expect(page.current_path).to eq '/'
expect(page).not_to have_text @user.email
expect(page).to have_text 'Выход из системы выполнен.'
end