Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/dfe/analytics.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ def self.configure
config.bigquery_timeout ||= 120
config.environment ||= ENV.fetch('RAILS_ENV', 'development')
config.log_only ||= false
config.async ||= true
config.queue ||= :default
config.user_identifier ||= proc { |user| user&.id }
config.entity_table_checks_enabled ||= false
Expand All @@ -83,6 +82,7 @@ def self.configure
config.azure_federated_auth ||= false
config.excluded_paths ||= []
config.excluded_models_proc ||= proc { |_model| false }
config.async = true if config.async.nil?

return unless config.azure_federated_auth

Expand Down
22 changes: 22 additions & 0 deletions spec/dfe/analytics_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,28 @@
end
end

describe '.async?' do
context 'when the async config has been set to true' do
before do
described_class.configure { |config| config.async = true }
end

it 'returns true' do
expect(described_class.async?).to be true
end
end

context 'when the async config has been set to false' do
before do
described_class.configure { |config| config.async = false }
end

it 'returns false' do
expect(described_class.async?).to be false
end
end
end

describe '.extract_model_attributes' do
with_model :Candidate do
table do |t|
Expand Down
Loading