Sha256: cb2a20ba733f17940d9a16d09f63f5fcf642523cb0f060bbdf07b11feeb8af8c
Contents?: true
Size: 578 Bytes
Versions: 21
Compression:
Stored size: 578 Bytes
Contents
# frozen_string_literal: true ::RSpec.shared_context 'when user is anonymous', shared_context: :metadata do before do visit '/' if link_exist?(::I18n.translate!('devise.log_out')) click_link(::I18n.translate!('devise.log_out')) elsif !link_exist?(::I18n.translate!('devise.log_in')) raise 'login nor logout link found' end end it 'should be a link to log in' do expect(page).to have_link(nil, href: '/users/sign_in') end def link_exist?(locator) find_link(locator) true rescue Capybara::ElementNotFound false end end
Version data entries
21 entries across 21 versions & 1 rubygems