debian-mirror-gitlab/spec/features/profiles/user_visits_profile_authentication_log_spec.rb

33 lines
667 B
Ruby
Raw Normal View History

2019-10-12 21:52:04 +05:30
# frozen_string_literal: true
2018-03-17 18:26:18 +05:30
require 'spec_helper'
describe 'User visits the authentication log' do
let(:user) { create(:user) }
2018-03-27 19:54:05 +05:30
context 'when user signed in' do
before do
sign_in(user)
end
2018-03-17 18:26:18 +05:30
2018-03-27 19:54:05 +05:30
it 'shows correct menu item' do
visit(audit_log_profile_path)
expect(page).to have_active_navigation('Authentication log')
end
2018-03-17 18:26:18 +05:30
end
2018-03-27 19:54:05 +05:30
context 'when user has activity' do
before do
create(:closed_issue_event, author: user)
gitlab_sign_in(user)
end
it 'shows user activity' do
visit(audit_log_profile_path)
expect(page).to have_content 'Signed in with standard authentication'
end
2018-03-17 18:26:18 +05:30
end
end