Fix spec for user redirect

* Very simple fix. I could also remove the test but as long as we still consider to switch back to the original implementation, I leave it here for now.
This commit is contained in:
Sebastian Serth
2020-09-28 19:17:30 +02:00
parent 654bf2ba33
commit 66c1b99230

View File

@ -126,6 +126,10 @@ describe Submission do
let(:exercise) {FactoryBot.create(:dummy_with_user_feedbacks, user_feedbacks_count: 42)}
let(:user) {FactoryBot.create(:external_user)}
before do
allow_any_instance_of(described_class).to receive(:redirect_to_feedback?).and_return(false)
end
it 'sends nobody to feedback page' do
30.times do |i|
submission = FactoryBot.create(:submission, exercise: exercise, user: FactoryBot.create(:external_user))