Skip to content

Commit

Permalink
feat: added specs
Browse files Browse the repository at this point in the history
  • Loading branch information
brunomiguelpinto committed Sep 30, 2024
1 parent e977386 commit a5bdaef
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ def perform(integration:)
end
end
end
end
end
20 changes: 20 additions & 0 deletions app/jobs/integrations/hubspot/properties/deploy_contacts_job.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# frozen_string_literal: true

module Integrations
module Hubspot
module Properties
class DeployContactsJobs < ApplicationJob
queue_as 'integrations'

retry_on LagoHttpClient::HttpError, wait: :polynomially_longer, attempts: 3
retry_on RequestLimitError, wait: :polynomially_longer, attempts: 10

def perform(integration:)
pp "job que faz cenas"
#result = Integrations::Hubspot::Properties::DeployContactsService.call(integration:)
#result.raise_if_error!
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# frozen_string_literal: true

require 'rails_helper'

RSpec.describe Integrations::Aggregator::SyncCustomObjectsAndPropertiesJob, type: :job do
describe '#perform' do
subject(:sync_custom_objects_job) { described_class }

let(:integration) { create(:hubspot_integration) }

it 'enqueues the jobs to send objects and properties to hubspot' do
described_class.perform_now(integration:)
end
end
end

0 comments on commit a5bdaef

Please sign in to comment.