Skip to content

Commit

Permalink
AP-5143: Remove geckoboard updates
Browse files Browse the repository at this point in the history
Remove the applicant_emailed geckoboard notification
  • Loading branch information
colinbruce committed Oct 25, 2024
1 parent 653c38e commit cd8a324
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 224 deletions.
15 changes: 0 additions & 15 deletions app/jobs/dashboard/applicant_email_job.rb

This file was deleted.

54 changes: 0 additions & 54 deletions app/models/dashboard/single_object/applicant_email.rb

This file was deleted.

8 changes: 0 additions & 8 deletions app/services/citizen_email_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ def send_email
addressee: applicant.email_address,
arguments: mailer_args,
)
notify_dashboard
end

private
Expand All @@ -22,13 +21,6 @@ def send_email

delegate :applicant, :provider, to: :legal_aid_application, allow_nil: true

def notify_dashboard
ActiveSupport::Notifications.instrument(
"dashboard.applicant_emailed",
legal_aid_application_id: legal_aid_application.id,
)
end

def mailer_args
[
legal_aid_application.application_ref,
Expand Down
7 changes: 1 addition & 6 deletions app/services/dashboard_event_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ def valid_events
firm_created
feedback_created
application_submitted
declined_open_banking
applicant_emailed]
declined_open_banking]
end

def application_created
Expand Down Expand Up @@ -71,8 +70,4 @@ def feedback_created
def application_submitted
Dashboard::UpdaterJob.perform_later("Applications")
end

def applicant_emailed
Dashboard::ApplicantEmailJob.perform_later(LegalAidApplication.find(payload[:legal_aid_application_id]))
end
end
3 changes: 0 additions & 3 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,19 +123,16 @@ class Application < Rails::Application
config.x.suspended_geckoboard_updater_jobs = {
development: %w[
Dashboard::FeedbackItemJob
Dashboard::ApplicantEmailJob
Dashboard::ProviderDataJob
Dashboard::UpdaterJob
],
test: %w[
Dashboard::FeedbackItemJob
Dashboard::ApplicantEmailJob
Dashboard::ProviderDataJob
Dashboard::UpdaterJob
],
uat: %w[
Dashboard::FeedbackItemJob
Dashboard::ApplicantEmailJob
Dashboard::ProviderDataJob
Dashboard::UpdaterJob
],
Expand Down
69 changes: 0 additions & 69 deletions spec/jobs/dashboard/applicant_email_job_spec.rb

This file was deleted.

49 changes: 0 additions & 49 deletions spec/models/dashboard/single_object/applicant_email_spec.rb

This file was deleted.

11 changes: 0 additions & 11 deletions spec/services/citizen_email_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,5 @@

send_email
end

it "notifies the dashboard" do
allow(ActiveSupport::Notifications).to receive(:instrument)

send_email

expect(ActiveSupport::Notifications).to have_received(:instrument).with(
"dashboard.applicant_emailed",
legal_aid_application_id: legal_aid_application.id,
)
end
end
end
9 changes: 0 additions & 9 deletions spec/services/dashboard_event_handler_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,4 @@
legal_aid_application.merits_complete!
end
end

context "when an applicant is emailed" do
let(:legal_aid_application) { create(:legal_aid_application, :with_applicant) }

it "fires the applicant_email job" do
expect(Dashboard::ApplicantEmailJob).to receive(:perform_later).at_least(:once)
CitizenEmailService.new(legal_aid_application).send_email
end
end
end

0 comments on commit cd8a324

Please sign in to comment.