Skip to content

Commit 1a6106e

Browse files
DNR500zetter-rpf
andauthored
chore: add flipper flag for school (#770)
## Status - Related to [1236 ](RaspberryPiFoundation/digital-editor-issues#1236) ## Points for consideration: ## What's changed? Sets up the scratch feature on the testing school for the integration test Co-authored-by: Chris Zetter <253059100+zetter-rpf@users.noreply.github.com>
1 parent d7d480a commit 1a6106e

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

lib/tasks/test_seeds.rake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ namespace :test_seeds do
5252
teacher_id = ENV.fetch('SEEDING_TEACHER_ID', TEST_USERS[:john_doe])
5353

5454
school = create_school(creator_id, TEST_SCHOOL)
55+
Flipper.enable_actor :cat_mode, school
5556
verify_school(school)
5657
assign_a_teacher(teacher_id, school)
5758

spec/lib/test_seeds_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@
4848
expect(School.find_by(creator_id:).verified_at).to be_truthy
4949
end
5050

51+
it 'enables scratch for the school' do
52+
school = School.find_by(creator_id:)
53+
expect(Flipper.enabled?(:cat_mode, school)).to be(true)
54+
end
55+
5156
it 'creates lessons with projects' do
5257
school = School.find_by(creator_id:)
5358
expect(SchoolClass.where(school_id: school.id)).to exist

0 commit comments

Comments
 (0)