Skip to content

Commit

Permalink
Merge branch 'refs/heads/master' into oveson/lottery-service-form-fin…
Browse files Browse the repository at this point in the history
…e-tuning
  • Loading branch information
moveson committed Dec 17, 2024
2 parents c087819 + bd2894c commit f0eb33b
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/jobs/delete_topic_resource_key_job.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

require "ostruct"

class DeleteTopicResourceKeyJob < ApplicationJob
queue_as :default

Expand Down
1 change: 1 addition & 0 deletions app/models/proto_record.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# frozen_string_literal: true

require "etl/etl"
require "ostruct"

class ProtoRecord
include ETL::Transformable
Expand Down
2 changes: 2 additions & 0 deletions app/services/find_not_expected_bibs.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

require "ostruct"

class FindNotExpectedBibs
include Interactors::Errors
include SplitAnalyzable
Expand Down
1 change: 1 addition & 0 deletions lib/etl/extractors/csv_file_strategy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

require "smarter_csv"
require "csv"
require "ostruct"

module ETL
module Extractors
Expand Down
21 changes: 21 additions & 0 deletions spec/jobs/delete_topic_resource_key_job_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# frozen_string_literal: true

require "rails_helper"

RSpec.describe DeleteTopicResourceKeyJob do
subject { described_class.new }

let(:topic_resource_key) { "arn:aws:sns:test" }

describe "#perform" do
let(:perform_job) { subject.perform(topic_resource_key) }
let(:expected_mock_resource) { OpenStruct.new(topic_resource_key: topic_resource_key, slug: topic_resource_key) }

before { allow(SnsTopicManager).to receive(:delete) }

it "sends a message to the topic manager" do
expect(SnsTopicManager).to receive(:delete).with(resource: expected_mock_resource)
perform_job
end
end
end

0 comments on commit f0eb33b

Please sign in to comment.