File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 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
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 )
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
Original file line number Diff line number Diff line change 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 )
Original file line number Diff line number Diff line change 11require "rails_helper"
22
33RSpec . 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
You can’t perform that action at this time.
0 commit comments