<commit_before>require 'rails_helper'

RSpec.describe NbPersonPushJob, type: :job do
  describe "#perform" do
    it "calls NationBuilder with correct args" do
      args = { attributes: { email: "<EMAIL>", phone: '510-555-9999' } }
      expect(Integration::NationBuilder).to receive(:create_or_update_person).with(args)
      NbPersonPushJob.new.perform(email: "<EMAIL>", phone: "510-555-9999")
    end

    it "creates RSVP when event_id is present" do
      args = { attributes: { email: "<EMAIL>" } }
      expect(Integration::NationBuilder).to receive(:create_or_update_person).
        with(args) { { 'id' => 6 } }
      expect(Integration::NationBuilder).to receive(:create_rsvp).
        with(event_id: 4, person_id: 6)
      NbPersonPushJob.new.perform(email:"<EMAIL>", event_id: 4)
    end
  end
end<commit_msg>fix another typo<commit_after>require 'rails_helper'

RSpec.describe NbPersonPushJob, type: :job do
  describe "#perform" do
    it "calls NationBuilder with correct args" do
      args = { attributes: { email: "<EMAIL>", phone: '510-555-9999' } }
      expect(Integration::NationBuilder).to receive(:create_or_update_person).with(args)
      NbPersonPushJob.new.perform(email: "<EMAIL>", phone: "510-555-9999")
    end

    it "creates RSVP when event_id is present" do
      args = { attributes: { email: "<EMAIL>" } }
      expect(Integration::NationBuilder).to receive(:create_or_update_person).
        with(args) { { 'id' => 6 } }
      expect(Integration::NationBuilder).to receive(:create_rsvp).
        with(event_id: 4, person_id: 6)
      NbPersonPushJob.new.perform(email: "<EMAIL>", event_id: 4)
    end
  end
end
{'fraction_non_alphanumeric': 0.1383495145631068, 'fraction_numerical': 0.02912621359223301, 'mean_word_length': 3.85, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6871039', 'n_tokens_mistral': 582, 'n_tokens_neox': 539, 'n_words': 120}