Skip to content

Commit d3c17bd

Browse files
authored
Merge pull request #6649 from Budmin/updating_email_instructions
Updating email instructions
2 parents e1ba543 + c6e5745 commit d3c17bd

File tree

11 files changed

+21
-18
lines changed

11 files changed

+21
-18
lines changed

app/controllers/users_controller.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ def update_email
8181

8282
bypass_sign_in(@user) if @user == true_user
8383

84+
flash[:success] = "Click the link in your new email to finalize the email transfer"
8485
redirect_to edit_users_path
8586
end
8687

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<p>Hello! <%= @email %>!</p>
2-
3-
<p>You can confirm your account email through the link below:</p>
4-
1+
<p>Click here to confirm your email.</p>
52
<p><%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %></p>
3+
<p>If you weren't expecting this email, please disregard.</p>

spec/requests/all_casa_admins/casa_admins_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
expect(ActionMailer::Base.deliveries.count).to eq(1)
7575
expect(ActionMailer::Base.deliveries.first).to be_a(Mail::Message)
7676
expect(ActionMailer::Base.deliveries.first.body.encoded)
77-
.to match("You can confirm your account email through the link below:")
77+
.to match("Click here to confirm your email")
7878
end
7979

8080
it { is_expected.to redirect_to edit_all_casa_admins_casa_org_casa_admin_path(casa_org, casa_admin) }

spec/requests/casa_admins_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
expect(ActionMailer::Base.deliveries.count).to eq(1)
107107
expect(ActionMailer::Base.deliveries.first).to be_a(Mail::Message)
108108
expect(ActionMailer::Base.deliveries.first.body.encoded)
109-
.to match("You can confirm your account email through the link below:")
109+
.to match("Click here to confirm your email")
110110
end
111111

112112
it "also respond as json", :aggregate_failures do

spec/requests/supervisors_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160
expect(ActionMailer::Base.deliveries.count).to eq(1)
161161
expect(ActionMailer::Base.deliveries.first).to be_a(Mail::Message)
162162
expect(ActionMailer::Base.deliveries.first.body.encoded)
163-
.to match("You can confirm your account email through the link below:")
163+
.to match("Click here to confirm your email")
164164
end
165165

166166
it "can set the supervisor to be inactive" do
@@ -206,7 +206,7 @@
206206
expect(ActionMailer::Base.deliveries.count).to eq(1)
207207
expect(ActionMailer::Base.deliveries.first).to be_a(Mail::Message)
208208
expect(ActionMailer::Base.deliveries.first.body.encoded)
209-
.to match("You can confirm your account email through the link below:")
209+
.to match("Click here to confirm your email")
210210
end
211211

212212
it "cannot change its own type" do

spec/requests/users_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@
256256

257257
expect(ActionMailer::Base.deliveries.count).to eq(1)
258258
expect(ActionMailer::Base.deliveries.last.body.encoded)
259-
.to match("You can confirm your account email through the link below:")
259+
.to match("Click here to confirm your email")
260260
end
261261
end
262262

@@ -304,7 +304,7 @@
304304

305305
expect(ActionMailer::Base.deliveries.count).to eq(1)
306306
expect(ActionMailer::Base.deliveries.last.body.encoded)
307-
.to match("You can confirm your account email through the link below:")
307+
.to match("Click here to confirm your email")
308308
end
309309

310310
it "bypasses sign in if the current user is the true user" do
@@ -363,7 +363,7 @@
363363

364364
expect(ActionMailer::Base.deliveries.count).to eq(1)
365365
expect(ActionMailer::Base.deliveries.last.body.encoded)
366-
.to match("You can confirm your account email through the link below:")
366+
.to match("Click here to confirm your email")
367367
end
368368

369369
it "bypasses sign in if the current user is the true user" do

spec/requests/volunteers_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@
250250
expect(ActionMailer::Base.deliveries.count).to eq(1)
251251
expect(ActionMailer::Base.deliveries.first).to be_a(Mail::Message)
252252
expect(ActionMailer::Base.deliveries.first.body.encoded)
253-
.to match("You can confirm your account email through the link below:")
253+
.to match("Click here to confirm your email")
254254
end
255255
end
256256

spec/system/casa_admins/edit_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
expect(ActionMailer::Base.deliveries.count).to eq(1)
4343
expect(ActionMailer::Base.deliveries.first).to be_a(Mail::Message)
4444
expect(ActionMailer::Base.deliveries.first.body.encoded)
45-
.to match("You can confirm your account email through the link below:")
45+
.to match("Click here to confirm your email")
4646

4747
expect(page).to have_text "Admin was successfully updated. Confirmation Email Sent."
4848
expect(page).to have_field("Email", with: @old_email)

spec/system/supervisors/edit_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@
182182
expect(ActionMailer::Base.deliveries.count).to eq(1)
183183
expect(ActionMailer::Base.deliveries.first).to be_a(Mail::Message)
184184
expect(ActionMailer::Base.deliveries.first.body.encoded)
185-
.to match("You can confirm your account email through the link below:")
185+
.to match("Click here to confirm your email")
186186

187187
expect(page).to have_text "Supervisor was successfully updated. Confirmation Email Sent."
188188
expect(page).to have_field("Email", with: @old_email)

spec/system/users/edit_spec.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,12 @@
112112
fill_in "New Email", with: "new_volunteer@example.com"
113113
click_on "Update Email"
114114

115+
expect(page).to have_content "Click the link in your new email to finalize the email transfer"
116+
115117
expect(ActionMailer::Base.deliveries.count).to eq(1)
116118
expect(ActionMailer::Base.deliveries.first).to be_a(Mail::Message)
117119
expect(ActionMailer::Base.deliveries.first.body.encoded)
118-
.to have_text("You can confirm your account email through the link below:")
120+
.to have_text("Click here to confirm your email")
119121
end
120122

121123
it "displays email errors messages when user is unable to set a email with incorrect current password" do
@@ -264,10 +266,12 @@
264266
fill_in "New Email", with: "new_supervisor@example.com"
265267
click_on "Update Email"
266268

269+
expect(page).to have_content "Click the link in your new email to finalize the email transfer"
270+
267271
expect(ActionMailer::Base.deliveries.count).to eq(1)
268272
expect(ActionMailer::Base.deliveries.first).to be_a(Mail::Message)
269273
expect(ActionMailer::Base.deliveries.first.body.encoded)
270-
.to match("You can confirm your account email through the link below:")
274+
.to match("Click here to confirm your email")
271275
end
272276

273277
it "displays email errors messages when user is unable to set a email with incorrect current password" do
@@ -428,7 +432,7 @@
428432
expect(ActionMailer::Base.deliveries.count).to eq(1)
429433
expect(ActionMailer::Base.deliveries.first).to be_a(Mail::Message)
430434
expect(ActionMailer::Base.deliveries.first.body.encoded)
431-
.to match("You can confirm your account email through the link below:")
435+
.to match("Click here to confirm your email")
432436
end
433437

434438
it "displays email errors messages when user is unable to set a email with incorrect current password" do

0 commit comments

Comments
 (0)