expect(pending_email_change_title_text(user,user)).toeq("You have requested to change your email address to updated_email@example.com.")
end
end
context"when viewing another user's profile"do
it"returns the correct text"do
expect(pending_email_change_title_text(current_user,user)).toeq("There has been a request to change this user’s email address to updated_email@example.com.")
expect(pending_email_change_banner_text(user)).toeq("A confirmation link has been sent to the new email address. The current email will continue to work until the change is confirmed.")
end
end
context"with support user"do
let(:user){FactoryBot.create(:user,:support)}
it"returns the correct text"do
expect(pending_email_change_banner_text(user)).toeq("A confirmation link has been sent to the new email address. The current email will continue to work until the change is confirmed. Deactivating this user will cancel the email change request.")