Skip to content

Commit

Permalink
make claim practitioner_email_address case insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
alkesh committed Oct 28, 2024
1 parent 075f628 commit 1946719
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
class MakeClaimPractitionerEmailAddressCitext < ActiveRecord::Migration[7.0]
def change
enable_extension "citext"

reversible do |dir|
dir.up do
change_column :claims, :practitioner_email_address, :citext
end

dir.down do
change_column :claims, :practitioner_email_address, :string
end
end
end
end
4 changes: 2 additions & 2 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.0].define(version: 2024_10_28_110426) do
ActiveRecord::Schema[7.0].define(version: 2024_10_28_161228) do
# These are extensions that must be enabled in order to support this database
enable_extension "citext"
enable_extension "pg_trgm"
Expand Down Expand Up @@ -103,7 +103,7 @@
t.jsonb "onelogin_credentials", default: {}
t.jsonb "onelogin_user_info", default: {}
t.string "paye_reference"
t.string "practitioner_email_address"
t.citext "practitioner_email_address"
t.string "provider_contact_name"
t.text "onelogin_uid"
t.datetime "onelogin_auth_at"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@
)
end

scenario "when correct email address with different case" do
when_early_years_payment_practitioner_journey_configuration_exists

visit "/early-years-payment-practitioner/find-reference?skip_landing_page=true&[email protected]"
expect(page).to have_content "Enter your claim reference"
fill_in "Claim reference number", with: claim.reference
click_button "Submit"

expect(page).to have_content "Sign in with GOV.UK One Login"
end

scenario "when different email address" do
when_early_years_payment_practitioner_journey_configuration_exists

Expand Down

0 comments on commit 1946719

Please sign in to comment.