Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
dalmaboros committed Jul 15, 2024
1 parent cf56815 commit 39183c1
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 43 deletions.
Original file line number Diff line number Diff line change
@@ -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|
Expand All @@ -34,4 +34,4 @@ def create_defaults
end
end
end
end
end
Original file line number Diff line number Diff line change
@@ -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'"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -16,4 +16,4 @@
expect(casa_org_2.standard_court_orders.map(&:value)).to eq(["Default 1", "Default 2"])
end
end
end
end
1 change: 0 additions & 1 deletion spec/system/court_dates/edit_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
13 changes: 1 addition & 12 deletions spec/system/standard_court_orders/standard_court_orders_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
1 change: 0 additions & 1 deletion spec/views/casa_orgs/edit.html.erb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 39183c1

Please sign in to comment.