File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818 expect ( invitation ) . not_to be_valid
1919 end
2020
21- it 'is valid with an unverified school' do
22- school = build ( :school , verified_at : nil )
23- invitation = build ( :teacher_invitation , school :)
21+ it 'is valid with an unverified school and immediate_school_onboarding is TRUE' do
22+ ClimateControl . modify ( ENABLE_IMMEDIATE_SCHOOL_ONBOARDING : 'true' ) do
23+ school = build ( :school , verified_at : nil )
24+ invitation = build ( :teacher_invitation , school :)
2425
25- expect ( invitation ) . to be_valid
26+ expect ( invitation ) . to be_valid
27+ end
28+ end
29+
30+ it 'is invalid with an unverified school and immediate_school_onboarding is FALSE' do
31+ ClimateControl . modify ( ENABLE_IMMEDIATE_SCHOOL_ONBOARDING : 'false' ) do
32+ school = build ( :school , verified_at : nil )
33+ invitation = build ( :teacher_invitation , school :)
34+
35+ expect ( invitation ) . not_to be_valid
36+ end
2637 end
2738
2839 it 'sends an invitation email after create' do
You can’t perform that action at this time.
0 commit comments