2019-10-12 21:52:04 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-23 00:09:42 +05:30
|
|
|
RSpec.describe 'User visits the authentication log' do
|
2018-03-17 18:26:18 +05:30
|
|
|
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
|