-
Notifications
You must be signed in to change notification settings - Fork 376
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename-me Change AppSec::Context ivars
- Loading branch information
Showing
16 changed files
with
71 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,7 +82,7 @@ def initialize(id, email, username) | |
context 'when logging in from Rememberable devise strategy' do | ||
let(:appsec_enabled) { true } | ||
let(:track_user_events_enabled) { true } | ||
let(:appsec_context) { instance_double(Datadog::AppSec::Context, trace: double, service_entry_span: double) } | ||
let(:appsec_context) { instance_double(Datadog::AppSec::Context, trace: double, span: double) } | ||
|
||
let(:mock_klass) do | ||
Class.new do | ||
|
@@ -109,7 +109,7 @@ def initialize(result) | |
context 'successful login' do | ||
let(:appsec_enabled) { true } | ||
let(:track_user_events_enabled) { true } | ||
let(:appsec_context) { instance_double(Datadog::AppSec::Context, trace: double, service_entry_span: double) } | ||
let(:appsec_context) { instance_double(Datadog::AppSec::Context, trace: double, span: double) } | ||
|
||
context 'with resource ID' do | ||
context 'safe mode' do | ||
|
@@ -118,7 +118,7 @@ def initialize(result) | |
it 'tracks event' do | ||
expect(Datadog::AppSec::Contrib::Devise::Tracking).to receive(:track_login_success).with( | ||
appsec_context.trace, | ||
appsec_context.service_entry_span, | ||
appsec_context.span, | ||
user_id: resource.id, | ||
**{} | ||
) | ||
|
@@ -132,7 +132,7 @@ def initialize(result) | |
it 'tracks event' do | ||
expect(Datadog::AppSec::Contrib::Devise::Tracking).to receive(:track_login_success).with( | ||
appsec_context.trace, | ||
appsec_context.service_entry_span, | ||
appsec_context.span, | ||
user_id: resource.id, | ||
**{ username: 'John', email: '[email protected]' } | ||
) | ||
|
@@ -150,7 +150,7 @@ def initialize(result) | |
it 'tracks event' do | ||
expect(Datadog::AppSec::Contrib::Devise::Tracking).to receive(:track_login_success).with( | ||
appsec_context.trace, | ||
appsec_context.service_entry_span, | ||
appsec_context.span, | ||
user_id: nil, | ||
**{} | ||
) | ||
|
@@ -164,7 +164,7 @@ def initialize(result) | |
it 'tracks event' do | ||
expect(Datadog::AppSec::Contrib::Devise::Tracking).to receive(:track_login_success).with( | ||
appsec_context.trace, | ||
appsec_context.service_entry_span, | ||
appsec_context.span, | ||
user_id: nil, | ||
**{ username: 'John', email: '[email protected]' } | ||
) | ||
|
@@ -177,7 +177,7 @@ def initialize(result) | |
context 'unsuccessful login' do | ||
let(:appsec_enabled) { true } | ||
let(:track_user_events_enabled) { true } | ||
let(:appsec_context) { instance_double(Datadog::AppSec::Context, trace: double, service_entry_span: double) } | ||
let(:appsec_context) { instance_double(Datadog::AppSec::Context, trace: double, span: double) } | ||
|
||
context 'with resource' do | ||
context 'safe mode' do | ||
|
@@ -186,7 +186,7 @@ def initialize(result) | |
it 'tracks event' do | ||
expect(Datadog::AppSec::Contrib::Devise::Tracking).to receive(:track_login_failure).with( | ||
appsec_context.trace, | ||
appsec_context.service_entry_span, | ||
appsec_context.span, | ||
user_id: resource.id, | ||
user_exists: true, | ||
**{} | ||
|
@@ -201,7 +201,7 @@ def initialize(result) | |
it 'tracks event' do | ||
expect(Datadog::AppSec::Contrib::Devise::Tracking).to receive(:track_login_failure).with( | ||
appsec_context.trace, | ||
appsec_context.service_entry_span, | ||
appsec_context.span, | ||
user_id: resource.id, | ||
user_exists: true, | ||
**{ username: 'John', email: '[email protected]' } | ||
|
@@ -218,7 +218,7 @@ def initialize(result) | |
it 'tracks event' do | ||
expect(Datadog::AppSec::Contrib::Devise::Tracking).to receive(:track_login_failure).with( | ||
appsec_context.trace, | ||
appsec_context.service_entry_span, | ||
appsec_context.span, | ||
user_id: nil, | ||
user_exists: false, | ||
**{} | ||
|
@@ -233,7 +233,7 @@ def initialize(result) | |
it 'tracks event' do | ||
expect(Datadog::AppSec::Contrib::Devise::Tracking).to receive(:track_login_failure).with( | ||
appsec_context.trace, | ||
appsec_context.service_entry_span, | ||
appsec_context.span, | ||
user_id: nil, | ||
user_exists: false, | ||
**{} | ||
|
Oops, something went wrong.