diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 09:55:51 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 09:55:51 +0000 |
commit | e8d2c2579383897a1dd7f9debd359abe8ae8373d (patch) | |
tree | c42be41678c2586d49a75cabce89322082698334 /spec/services/audit_event_service_spec.rb | |
parent | fc845b37ec3a90aaa719975f607740c22ba6a113 (diff) | |
download | gitlab-ce-e8d2c2579383897a1dd7f9debd359abe8ae8373d.tar.gz |
Add latest changes from gitlab-org/gitlab@14-1-stable-eev14.1.0-rc42
Diffstat (limited to 'spec/services/audit_event_service_spec.rb')
-rw-r--r-- | spec/services/audit_event_service_spec.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/services/audit_event_service_spec.rb b/spec/services/audit_event_service_spec.rb index 997f506c269..ce7b43972da 100644 --- a/spec/services/audit_event_service_spec.rb +++ b/spec/services/audit_event_service_spec.rb @@ -6,6 +6,7 @@ RSpec.describe AuditEventService do let_it_be(:project) { create(:project) } let_it_be(:user) { create(:user, :with_sign_ins) } let_it_be(:project_member) { create(:project_member, user: user) } + let(:service) { described_class.new(user, project, { action: :destroy }) } let(:logger) { instance_double(Gitlab::AuditJsonLogger) } @@ -78,15 +79,14 @@ RSpec.describe AuditEventService do context 'with IP address', :request_store do using RSpec::Parameterized::TableSyntax - where(:from_caller, :from_context, :from_author_sign_in, :output) do - '192.168.0.1' | '192.168.0.2' | '192.168.0.3' | '192.168.0.1' - nil | '192.168.0.2' | '192.168.0.3' | '192.168.0.2' - nil | nil | '192.168.0.3' | '192.168.0.3' + where(:from_context, :from_author_sign_in, :output) do + '192.168.0.2' | '192.168.0.3' | '192.168.0.2' + nil | '192.168.0.3' | '192.168.0.3' end with_them do let(:user) { create(:user, current_sign_in_ip: from_author_sign_in) } - let(:audit_service) { described_class.new(user, user, with: 'standard', ip_address: from_caller) } + let(:audit_service) { described_class.new(user, user, with: 'standard') } before do allow(Gitlab::RequestContext.instance).to receive(:client_ip).and_return(from_context) |