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