File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change 99 it "can successfully edit user display name and phone number" do
1010 expected_display_name = "Root Admin"
1111 expected_phone_number = "+14398761234"
12- expected_date_of_birth = "1997/04/ 16"
12+ expected_date_of_birth = "1997-04- 16"
1313
1414 visit edit_casa_admin_path ( admin )
1515
2020
2121 click_on "Submit"
2222
23- admin . reload
24-
2523 expect ( page ) . to have_text "Casa Admin was successfully updated."
26-
27- expect ( admin . display_name ) . to eq expected_display_name
28- expect ( admin . phone_number ) . to eq expected_phone_number
29- expect ( admin . date_of_birth . strftime ( "%Y/%m/%d" ) ) . to eq expected_date_of_birth
30- expect ( admin . monthly_learning_hours_report ) . to be_truthy
24+ expect ( page ) . to have_field "Display name" , with : expected_display_name
25+ expect ( page ) . to have_field "Phone number" , with : expected_phone_number
26+ expect ( page ) . to have_field "Date of birth" , with : expected_date_of_birth
27+ expect ( page ) . to have_checked_field ( "Receive Monthly Learning Hours Report" )
3128 end
3229 end
3330
4946
5047 expect ( page ) . to have_text "Admin was successfully updated. Confirmation Email Sent."
5148 expect ( page ) . to have_field ( "Email" , with : @old_email )
49+ admin . reload
5250 expect ( admin . unconfirmed_email ) . to eq ( "new_admin_email@example.com" )
5351 end
5452
5553 it "succesfully updates the user email once the user confirms the changes" do
5654 admin . confirm
57- admin . reload
5855 visit edit_casa_admin_path ( admin )
5956
6057 expect ( page ) . to have_field ( "Email" , with : "new_admin_email@example.com" )
58+ admin . reload
6159 expect ( admin . old_emails ) . to eq ( [ @old_email ] )
6260 end
6361 end
You can’t perform that action at this time.
0 commit comments