-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
17 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
RSpec.feature "Early years payment provider" do | ||
let(:journey_session) { Journeys::EarlyYearsPayment::Provider::Session.last } | ||
let(:mail) { ActionMailer::Base.deliveries.last } | ||
let(:otp) { mail[:personalisation].unparsed_value[:one_time_password] } | ||
let(:magic_link) { mail[:personalisation].unparsed_value[:magic_link] } | ||
|
||
scenario "happy path claim" do | ||
when_early_years_payment_provider_journey_configuration_exists | ||
|
@@ -24,9 +24,9 @@ | |
expect(page).to have_content("We have sent an email to [email protected]") | ||
|
||
expect(mail.to).to eq ["[email protected]"] | ||
expect(otp).to match(/\A\d{6}\Z/) | ||
expect(magic_link).to match(/\?code=\d{6}\Z/) | ||
|
||
visit claim_path(Journeys::EarlyYearsPayment::Provider::ROUTING_NAME, :consent, code: otp) | ||
visit magic_link | ||
expect(journey_session.reload.answers.email_verified).to be true | ||
expect(page).to have_content("Declaration of Employee Consent") | ||
check "I confirm that I have obtained consent from my employee and have provided them with the relevant privacy notice." | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters