Skip to content

Commit 61664b7

Browse files
committed
Add invite spec example to diagnose flakey example
The example just before this one keeps failing in the CircleCI build [1], but I haven't been able to replicate it locally. It's hard to work out what's going on, because `SchoolTeacher::Invite#call` swallows any exception. I'm hoping that this new assertion _might_ fail for the same reason, but then display the exception message to give us more clues. [1]: https://app.circleci.com/pipelines/github/RaspberryPiFoundation/editor-api/2359/workflows/ecf1c252-3f22-45e6-b0fe-08363f66c8d9/jobs/4447
1 parent f065a8b commit 61664b7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

spec/concepts/school_teacher/invite_spec.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@
1616
expect(response.success?).to be(true)
1717
end
1818

19+
it 'does not return an error in operation response' do
20+
response = described_class.call(school:, school_teacher_params:, token:)
21+
expect(response[:error]).to be_blank
22+
end
23+
1924
it 'creates a TeacherInvitation' do
2025
expect { described_class.call(school:, school_teacher_params:, token:) }.to change(TeacherInvitation, :count)
2126
end

0 commit comments

Comments
 (0)