File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,10 @@ def define_school_student_abilities(user:, school:)
103103 end
104104
105105 def define_experience_cs_admin_abilities ( user )
106- can :create , :public_project if user . experience_cs_admin?
106+ return unless user . experience_cs_admin?
107+
108+ can :create , :public_project
109+ can :update , :public_project
107110 end
108111
109112 def school_teacher_can_manage_lesson? ( user :, school :, lesson :)
Original file line number Diff line number Diff line change 3131 end
3232
3333 it { is_expected . not_to be_able_to ( :create , :public_project ) }
34+ it { is_expected . not_to be_able_to ( :update , :public_project ) }
3435 end
3536
3637 context 'with a standard user' do
6061 end
6162
6263 it { is_expected . not_to be_able_to ( :create , :public_project ) }
64+ it { is_expected . not_to be_able_to ( :update , :public_project ) }
6365 end
6466
6567 context 'with a teacher' do
8991 end
9092
9193 it { is_expected . not_to be_able_to ( :create , :public_project ) }
94+ it { is_expected . not_to be_able_to ( :update , :public_project ) }
9295 end
9396
9497 context 'with an owner' do
118121 end
119122
120123 it { is_expected . not_to be_able_to ( :create , :public_project ) }
124+ it { is_expected . not_to be_able_to ( :update , :public_project ) }
121125 end
122126
123127 context 'with a student' do
147151 end
148152
149153 it { is_expected . not_to be_able_to ( :create , :public_project ) }
154+ it { is_expected . not_to be_able_to ( :update , :public_project ) }
150155 end
151156
152157 context 'with an experience-cs admin' do
153158 let ( :user ) { build ( :experience_cs_admin_user ) }
154159
155160 it { is_expected . to be_able_to ( :create , :public_project ) }
161+ it { is_expected . to be_able_to ( :update , :public_project ) }
156162 end
157163
158164 # rubocop:disable RSpec/MultipleMemoizedHelpers
You can’t perform that action at this time.
0 commit comments