From 74896cbf11ac2d924b4067d9c0ea567d20b3a4fd Mon Sep 17 00:00:00 2001 From: Jon Roberts Date: Thu, 26 Sep 2024 15:15:29 -0400 Subject: [PATCH] rebase fixes --- spec/factories/case_contacts.rb | 1 - spec/models/case_contact_spec.rb | 6 ------ spec/system/case_contacts/new_spec.rb | 3 +-- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/spec/factories/case_contacts.rb b/spec/factories/case_contacts.rb index d8aac5e7e6..ad62fa9004 100644 --- a/spec/factories/case_contacts.rb +++ b/spec/factories/case_contacts.rb @@ -12,7 +12,6 @@ active # use the `:active` enum trait association :creator, factory: :user casa_case - contact_types { [association(:contact_type)] } contact_types { [association(:contact_type)] } duration_minutes { 60 } diff --git a/spec/models/case_contact_spec.rb b/spec/models/case_contact_spec.rb index c924ad0886..af43e8a7c8 100644 --- a/spec/models/case_contact_spec.rb +++ b/spec/models/case_contact_spec.rb @@ -132,12 +132,6 @@ expect(obj).not_to be_valid expect(obj.errors.full_messages).to include("Must enter miles driven to receive driving reimbursement.") end - - it "requires a case to be selected" do - obj = build_stubbed(:case_contact, :expenses_status, :wants_reimbursement, draft_case_ids: []) - expect(obj).not_to be_valid - expect(obj.errors.full_messages).to include("CASA Case must be selected") - end end describe "#update_cleaning_contact_types" do diff --git a/spec/system/case_contacts/new_spec.rb b/spec/system/case_contacts/new_spec.rb index 7db7d9adcd..fc2f2c4adb 100644 --- a/spec/system/case_contacts/new_spec.rb +++ b/spec/system/case_contacts/new_spec.rb @@ -1,5 +1,4 @@ require "rails_helper" -require "action_view" RSpec.describe "case_contacts/new", :js, type: :system do let(:casa_org) { create :casa_org } @@ -90,7 +89,7 @@ fill_in_contact_details(contact_types: []) expect { click_on "Submit" }.to not_change(CaseContact.active, :count) - expect(page).to have_text("Contact Type(s) must be selected") + expect(page).to have_text("Contact Type must be selected") check contact_types.first.name expect { click_on "Submit" }.to change(CaseContact.active, :count).by(1) end