Skip to content

Commit

Permalink
fixed all, but one test
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgeCodes19 committed Oct 1, 2024
1 parent e4a8012 commit e21680c
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 12 deletions.
1 change: 0 additions & 1 deletion app/app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ def get_locale(request)
locale_sources = [
params[:locale],
request.path.split("/")[1],
URI(request.env["HTTP_REFERER"]).path.split("/")[1],
request.env["HTTP_ACCEPT_LANGUAGE"]&.scan(/^[a-z]{2}/)&.first,
I18n.default_locale
]
Expand Down
2 changes: 1 addition & 1 deletion app/app/views/caseworker/cbv_flow_invitations/_ma.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<%= f.text_field :agency_id_number, label: t(".invite.agency_id_number") %>
<%= f.select :language, options_for_select(CbvFlowInvitation::VALID_LANGUAGES.map { |lang| [lang.to_s.upcase, lang] }), { label: t(".invite.language") } %>
<%= f.select :language, options_for_select(CbvFlowInvitation::VALID_LANGUAGES.map { |lang| [ lang.to_s.upcase, lang ] }), { label: t(".invite.language") } %>
<%= f.date_picker :snap_application_date, label: t(".invite.todays_date") %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<%= f.text_field :case_number, label: t(".invite.case_number") %>
<%= f.select :language, options_for_select(CbvFlowInvitation::VALID_LANGUAGES.map { |lang| [lang.to_s.upcase, lang] }), { label: t(".invite.language") } %>
<%= f.select :language, options_for_select(CbvFlowInvitation::VALID_LANGUAGES.map { |lang| [ lang.to_s.upcase, lang ] }), { label: t(".invite.language") } %>
<%= f.date_picker :snap_application_date, label: t(".invite.snap_application_date") %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<%= f.text_field :case_number, label: t(".invite.case_number") %>
<%= f.select :language, options_for_select(CbvFlowInvitation::VALID_LANGUAGES.map { |lang| [lang.to_s.upcase, lang] }), { label: t(".invite.language") } %>
<%= f.select :language, options_for_select(CbvFlowInvitation::VALID_LANGUAGES.map { |lang| [ lang.to_s.upcase, lang ] }), { label: t(".invite.language") } %>
<%= f.date_picker :snap_application_date, label: t(".invite.todays_date") %>
Expand Down
5 changes: 1 addition & 4 deletions app/app/views/cbv/summaries/show.pdf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,8 @@
<% end %>
<% if @cbv_flow.additional_information.dig(account_id, "comment").present? %>
<h2><%= t('.additional_information_title') %></h2>
<h2><%= t(".additional_information_title") %></h2>

<p><%= @cbv_flow.additional_information.dig(account_id, "comment") %></p>
<% end %>
<% end %>



4 changes: 2 additions & 2 deletions app/config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ en:
models:
cbv_flow_invitation:
attributes:
language:
invalid_format: Language must be either English (en) or Spanish (es).
agency_id_number:
blank: Enter a valid agency ID number.
invalid_format: Agency ID number must be 7 digits.
Expand All @@ -21,6 +19,8 @@ en:
invalid_format: Enter an email address in the correct format, like [email protected]
first_name:
blank: Enter the client's first name.
language:
invalid_format: Language must be either English (en) or Spanish (es).
last_name:
blank: Enter the client's last name.
snap_application_date:
Expand Down
4 changes: 2 additions & 2 deletions app/spec/services/pinwheel_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
end

it 'returns a user token' do
response = service.create_link_token(end_user_id: end_user_id, response_type: 'employer', id: 'fake_id')
response = service.create_link_token(end_user_id: end_user_id, response_type: 'employer', id: 'fake_id', language: 'en')
expect(response['data']['id']).to eq(end_user_id)
end

context "with an empty response_type and id" do
it 'returns a user token' do
response = service.create_link_token(end_user_id: end_user_id, response_type: '', id: '')
response = service.create_link_token(end_user_id: end_user_id, response_type: '', id: '', language: 'en')
expect(response['data']['id']).to eq(end_user_id)
end
end
Expand Down

0 comments on commit e21680c

Please sign in to comment.