diff --git a/app/services/deployment/create_default_standard_court_orders_service.rb b/app/services/deployment/create_default_standard_court_orders_service.rb index 45ff525579..545c4c03a2 100644 --- a/app/services/deployment/create_default_standard_court_orders_service.rb +++ b/app/services/deployment/create_default_standard_court_orders_service.rb @@ -1,30 +1,30 @@ module Deployment class CreateDefaultStandardCourtOrdersService DEFAULT_STANDARD_COURT_ORDERS = [ - "Birth certificate for the Respondent’s", - "Domestic Violence Education/Group", - "Educational monitoring for the Respondent", - "Educational or Vocational referrals", - "Family therapy", - "Housing support for the [parent]", - "Independent living skills classes or workshops", - "Individual therapy for the [parent]", - "Individual therapy for the Respondent", - "Learners’ permit for the Respondent, drivers’ education and driving hours when needed", - "No contact with (mother, father, other guardian)", - "Parenting Classes (mother, father, other guardian)", - "Psychiatric Evaluation and follow all recommendations (child, mother, father, other guardian)", - "Substance abuse assessment for the [parent]", - "Substance Abuse Evaluation and follow all recommendations (child, mother, father, other guardian)", - "Substance Abuse Treatment (child, mother, father, other guardian)", - "Supervised visits", - "Supervised visits at DSS", - "Therapy (child, mother, father, other guardian)", - "Tutor for the Respondent", - "Urinalysis (child, mother, father, other guardian)", - "Virtual Visits", - "Visitation assistance for the Respondent to see [family]" - ].freeze + "Birth certificate for the Respondent’s", + "Domestic Violence Education/Group", + "Educational monitoring for the Respondent", + "Educational or Vocational referrals", + "Family therapy", + "Housing support for the [parent]", + "Independent living skills classes or workshops", + "Individual therapy for the [parent]", + "Individual therapy for the Respondent", + "Learners’ permit for the Respondent, drivers’ education and driving hours when needed", + "No contact with (mother, father, other guardian)", + "Parenting Classes (mother, father, other guardian)", + "Psychiatric Evaluation and follow all recommendations (child, mother, father, other guardian)", + "Substance abuse assessment for the [parent]", + "Substance Abuse Evaluation and follow all recommendations (child, mother, father, other guardian)", + "Substance Abuse Treatment (child, mother, father, other guardian)", + "Supervised visits", + "Supervised visits at DSS", + "Therapy (child, mother, father, other guardian)", + "Tutor for the Respondent", + "Urinalysis (child, mother, father, other guardian)", + "Virtual Visits", + "Visitation assistance for the Respondent to see [family]" + ].freeze def create_defaults CasaOrg.all.each do |casa_org| @@ -34,4 +34,4 @@ def create_defaults end end end -end \ No newline at end of file +end diff --git a/lib/tasks/deployment/20240708014020_create_default_standard_court_orders.rake b/lib/tasks/deployment/20240708014020_create_default_standard_court_orders.rake index 18b11f30bf..36b3d75f01 100644 --- a/lib/tasks/deployment/20240708014020_create_default_standard_court_orders.rake +++ b/lib/tasks/deployment/20240708014020_create_default_standard_court_orders.rake @@ -1,5 +1,5 @@ namespace :after_party do - desc 'Deployment task: Create default standard court orders for every CASA org' + desc "Deployment task: Create default standard court orders for every CASA org" task create_default_standard_court_orders: :environment do puts "Running deploy task 'create_default_standard_court_orders'" diff --git a/spec/services/deployment/create_default_standard_court_orders_service_spec.rb b/spec/services/deployment/create_default_standard_court_orders_service_spec.rb index 375d7b219f..ef8785104f 100644 --- a/spec/services/deployment/create_default_standard_court_orders_service_spec.rb +++ b/spec/services/deployment/create_default_standard_court_orders_service_spec.rb @@ -5,8 +5,8 @@ let!(:casa_org_1) { create(:casa_org) } let!(:casa_org_2) { create(:casa_org) } - it 'creates StandardCourtOrders from DEFAULT_STANDARD_COURT_ORDERS for each org' do - stub_const("Deployment::CreateDefaultStandardCourtOrdersService::DEFAULT_STANDARD_COURT_ORDERS", + it "creates StandardCourtOrders from DEFAULT_STANDARD_COURT_ORDERS for each org" do + stub_const("Deployment::CreateDefaultStandardCourtOrdersService::DEFAULT_STANDARD_COURT_ORDERS", ["Default 1", "Default 2"]) described_class.new.create_defaults @@ -16,4 +16,4 @@ expect(casa_org_2.standard_court_orders.map(&:value)).to eq(["Default 1", "Default 2"]) end end -end \ No newline at end of file +end diff --git a/spec/system/court_dates/edit_spec.rb b/spec/system/court_dates/edit_spec.rb index a24247795e..bec2f939ef 100644 --- a/spec/system/court_dates/edit_spec.rb +++ b/spec/system/court_dates/edit_spec.rb @@ -35,7 +35,6 @@ end it "adds a standard court order", js: true do - select("Some Totally New Value", from: "Court Order Type") click_button("Add a court order") diff --git a/spec/system/standard_court_orders/standard_court_orders_spec.rb b/spec/system/standard_court_orders/standard_court_orders_spec.rb index 285442f1ae..cf1b4140bb 100644 --- a/spec/system/standard_court_orders/standard_court_orders_spec.rb +++ b/spec/system/standard_court_orders/standard_court_orders_spec.rb @@ -25,7 +25,7 @@ create(:standard_court_order, value: "Substance Abuse Treatment (child, mother, father, other guardian)") visit edit_casa_org_path(casa_org) - + within("#standard-court-orders") do click_button "Actions Menu" click_link "Delete" @@ -37,15 +37,4 @@ expect(page).to have_css("div.alert", text: "Standard court order was successfully deleted.") expect(page).to_not have_css("tr", text: "Substance Abuse Treatment (child, mother, father, other guardian)") end - - # it "allows a volunteer to select a standard court order" do - # sign_in volunteer - # - # create(:standard_court_order, value: "Substance Abuse Treatment (child, mother, father, other guardian)") - # - # visit edit_casa_case_path(casa_case) - # select("Substance Abuse Treatment (child, mother, father, other guardian)", from: "Court Order Type") - # click_button("Add a court order") - # - # end end diff --git a/spec/views/casa_orgs/edit.html.erb_spec.rb b/spec/views/casa_orgs/edit.html.erb_spec.rb index 473de8140a..105443203b 100644 --- a/spec/views/casa_orgs/edit.html.erb_spec.rb +++ b/spec/views/casa_orgs/edit.html.erb_spec.rb @@ -10,7 +10,6 @@ assign(:learning_hour_topics, []) assign(:sent_emails, []) assign(:contact_topics, []) - # assign(:standard_court_orders, []) sign_in build_stubbed(:casa_admin) end