Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strip emoji from application notes field #19938

Merged
merged 1 commit into from
Jan 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ def update
end
application_data["regional_partner_id"] = application_data.delete "regional_partner_filter"

application_data["notes"] = application_data["notes"].strip_utf8mb4 if application_data["notes"]

@application.update!(application_data)

# only allow those with full management permission to lock or unlock
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,14 @@ class ApplicationsControllerTest < ::ActionController::TestCase
refute data['locked']
end

test 'notes field will strip pandas' do
sign_in @workshop_organizer
put :update, params: {id: @csf_facilitator_application_with_partner, application: {notes: panda_panda}}
assert_response :success
data = JSON.parse(response.body)
assert_equal data['notes'], "Panda"
end

test 'csv download for csd teacher returns expected columns' do
sign_in @workshop_admin

Expand Down