diff --git a/app/views/users/_edit_profile.erb b/app/views/users/_edit_profile.erb index cdf0ee3a7a..900bd46e81 100644 --- a/app/views/users/_edit_profile.erb +++ b/app/views/users/_edit_profile.erb @@ -6,6 +6,10 @@ Added to system <%= resource&.decorate(context: {format: :edit_profile})&.formatted_created_at %> +
+ Email + <%= resource&.email %> +
Invitation email sent <%= resource&.decorate(context: {format: :edit_profile})&.formatted_invitation_sent_at || "never" %> diff --git a/spec/requests/users_spec.rb b/spec/requests/users_spec.rb index 0e7ef5a609..f1dd176c94 100644 --- a/spec/requests/users_spec.rb +++ b/spec/requests/users_spec.rb @@ -9,21 +9,25 @@ describe "GET /edit" do context "with a volunteer signed in" do it "renders a successful response" do - sign_in create(:volunteer) + volunteer = create(:volunteer) + sign_in volunteer get edit_users_path expect(response).to be_successful + expect(response.body).to include(volunteer.email) end end context "with an admin signed in" do it "renders a successful response" do - sign_in build(:casa_admin) + admin = build(:casa_admin) + sign_in admin get edit_users_path expect(response).to be_successful + expect(response.body).to include(admin.email) end end end