Skip to content

Commit

Permalink
apply feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
GustavoCaso committed Apr 27, 2023
1 parent 3c84e41 commit 0b45c70
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion spec/datadog/appsec/remote_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@
}

expect(Datadog::AppSec).to receive(:reconfigure).with(ruleset: expected_ruleset)
.and_return(nil)
changes = transaction
receiver.call(repository, changes)
end
Expand All @@ -166,13 +167,15 @@
let(:transaction) { repository.transaction { |repository, transaction| } }

it 'uses the rules from the appsec settings' do
ruleset = ''
ruleset = 'foo'

expect(Datadog::AppSec::Processor::RuleLoader).to receive(:load_rules).with(
ruleset: Datadog.configuration.appsec.ruleset
).and_return(ruleset)

changes = transaction
expect(Datadog::AppSec).to receive(:reconfigure).with(ruleset: ruleset)
.and_return(nil)
receiver.call(repository, changes)
end

Expand Down

0 comments on commit 0b45c70

Please sign in to comment.