Skip to content

Commit 9deee4c

Browse files
Address Copilot comments
1 parent 6ffa551 commit 9deee4c

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

spec/requests/volunteers_spec.rb

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

133133
last_email = ActionMailer::Base.deliveries.last
134134
expect(last_email.to).to eq ["volunteer1@example.com"]
135-
expect(last_email.subject).to eq("CASA Console invitation instructions")
135+
expect(last_email.subject).to eq(I18n.t("devise.mailer.invitation_instructions.subject"))
136136
expect(last_email.html_part.body.encoded).to include("your new Volunteer account")
137137

138138
volunteer = Volunteer.last
@@ -220,7 +220,7 @@
220220
volunteer = Volunteer.last
221221
expect(volunteer.email).to eq("volunteer1@example.com")
222222
expect(volunteer.display_name).to eq("Example")
223-
expect(volunteer.casa_org).to eq(admin.casa_org)
223+
expect(volunteer.casa_org).to eq(supervisor.casa_org)
224224
expect(volunteer.invitation_created_at).to be_present
225225
expect(volunteer.invitation_accepted_at).to be_nil
226226
expect(response).to redirect_to edit_volunteer_path(volunteer)
@@ -397,7 +397,7 @@
397397
expect(volunteer.invitation_created_at.present?).to eq(true)
398398
expect(Devise.mailer.deliveries.count).to eq(1)
399399
expect(Devise.mailer.deliveries.first.to).to eq([volunteer.email])
400-
expect(Devise.mailer.deliveries.first.subject).to eq("CASA Console invitation instructions")
400+
expect(Devise.mailer.deliveries.first.subject).to eq(I18n.t("devise.mailer.invitation_instructions.subject"))
401401
expect(response).to redirect_to(edit_volunteer_path(volunteer))
402402
end
403403
end

spec/views/volunteers/edit.html.erb_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,11 @@
187187
expect(rendered).to have_content("Resend Invitation")
188188
end
189189

190-
it "hides resent button after invitation has been accepted" do
190+
it "hides resend button after invitation has been accepted" do
191191
administrator = build_stubbed :casa_admin
192192
enable_pundit(view, administrator)
193193
org = create :casa_org
194-
volunteer = create :volunteer, casa_org: org
194+
volunteer = create :volunteer, casa_org: administrator.casa_org
195195

196196
allow(view).to receive(:current_user).and_return(administrator)
197197
allow(view).to receive(:current_organization).and_return(administrator.casa_org)

spec/views/volunteers/new.html.erb_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require "rails_helper"
22

33
RSpec.describe "volunteers/new", type: :view do
4-
it "allows creating a volunteer" do
4+
it "renders the new volunteer form with editable fields" do
55
administrator = build_stubbed :casa_admin
66
enable_pundit(view, administrator)
77

0 commit comments

Comments
 (0)