Skip to content

Commit 380b1e2

Browse files
committed
table fix and specs
1 parent 73f25c7 commit 380b1e2

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

app/decorators/casa_case_decorator.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,12 @@ def successful_contacts_this_week_before(date)
9292
def transition_aged_youth
9393
text = object.in_transition_age? ? "Yes #{CasaCase::TRANSITION_AGE_YOUTH_ICON}" : "No #{CasaCase::NON_TRANSITION_AGE_YOUTH_ICON}"
9494
if object.in_transition_age?
95-
badge_html = h.render(partial: 'shared/emancipation_link', locals: { casa_case: object })
95+
badge_html = h.render(partial: "shared/emancipation_link", locals: {casa_case: object})
9696
h.safe_join([text, " ", badge_html])
9797
else
9898
text
9999
end
100-
end
100+
end
101101

102102
def transition_aged_youth_icon
103103
object.in_transition_age? ? CasaCase::TRANSITION_AGE_YOUTH_ICON : CasaCase::NON_TRANSITION_AGE_YOUTH_ICON

app/javascript/src/dashboard.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ $(() => { // JQuery's callback for the DOM loading
7272
return statusArray.includes(status) &&
7373
assignedToVolunteerArray.includes(assignedToVolunteer) &&
7474
assignedToMoreThanOneVolunteerArray.includes(assignedToMoreThanOneVolunteer) &&
75-
assignedToTransitionYouthArray.some(filterValue =>
75+
assignedToTransitionYouthArray.some(filterValue =>
7676
assignedToTransitionYouth.toLowerCase().includes(filterValue.toLowerCase().replace(/[^a-zA-Z]/g, ''))
7777
) &&
7878
caseNumberPrefixArray.includes(caseNumberPrefix)

app/views/shared/_emancipation_link.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
<%= render BadgeComponent.new(text: casa_case.decorate.emancipation_checklist_count,
55
type: :light,
66
margin: false) %>
7-
<% end %>
7+
<% end %>

spec/decorators/casa_case_decorator_spec.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,10 @@
6363
end
6464

6565
it "returns transition age youth status with icon if over 14 years old" do
66-
casa_case = build(:casa_case, birth_month_year_youth: CasaCase::TRANSITION_AGE.years.ago)
66+
casa_case = build_stubbed(:casa_case, birth_month_year_youth: CasaCase::TRANSITION_AGE.years.ago)
6767
expect(casa_case.decorate.transition_aged_youth)
68-
.to eq "Yes #{CasaCase::TRANSITION_AGE_YOUTH_ICON}"
68+
.to include "Yes #{CasaCase::TRANSITION_AGE_YOUTH_ICON}"
69+
expect(casa_case.decorate.transition_aged_youth).to include "Emancipation"
6970
end
7071

7172
it "returns non-transition age youth status with icon if not over 14 years old" do

0 commit comments

Comments
 (0)