Skip to content

Commit

Permalink
Debug AdminMailer in CI tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
moveson committed Feb 13, 2018
1 parent 72b4e86 commit 3ff15a6
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 242 deletions.
1 change: 1 addition & 0 deletions app/mailers/admin_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ class AdminMailer < ApplicationMailer
def new_event(event, user)
@event = event
@user = user
p "ADMIN_EMAIL is #{ENV['ADMIN_EMAIL']}"
mail(to: ENV['ADMIN_EMAIL'], subject: "New event: #{@event.name}")
end
end
2 changes: 0 additions & 2 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,5 @@ class Application < Rails::Application
config.autoload_paths += %W(#{config.root}/lib)
config.autoload_paths += Dir[File.join(Rails.root, "lib", "core_ext", "*.rb")].each {|l| require l }
config.autoload_paths += ['app/presenters/*.rb']

config.active_job.queue_adapter = :sidekiq
end
end
2 changes: 2 additions & 0 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
# Raise an error on page load if there are pending migrations.
config.active_record.migration_error = :page_load

config.active_job.queue_adapter = :sidekiq

# Debug mode disables concatenation and preprocessing of assets.
# This option may cause significant delays in view rendering with a large
# number of complex assets.
Expand Down
2 changes: 2 additions & 0 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
enable_starttls_auto: true
}

config.active_job.queue_adapter = :sidekiq

# Full error reports are disabled and caching is turned on.
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
Expand Down
2 changes: 2 additions & 0 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
config.action_mailer.delivery_method = :test
config.action_mailer.default_url_options = {host: ENV['BASE_URI']}

config.active_job.queue_adapter = :test

# Randomize the order test cases are executed.
config.active_support.test_order = :random

Expand Down
1 change: 0 additions & 1 deletion spec/mailers/admin_mailer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
let(:event) { create(:event) }

it 'creates a job' do
ActiveJob::Base.queue_adapter = :test
expect { AdminMailer.new_event(event, user).deliver_later }.to have_enqueued_job.on_queue('mailers')
end

Expand Down
239 changes: 0 additions & 239 deletions spec/system/live_entry_flow_spec.rb

This file was deleted.

0 comments on commit 3ff15a6

Please sign in to comment.