Fix access to exercise-specific RfC listing
This commit is contained in:

committed by
Sebastian Serth

parent
44b32b6f6a
commit
40d83dbb1d
@ -24,7 +24,7 @@ describe RequestForCommentsController do
|
||||
rfc_other_study_group.user.update(study_groups: [another_study_group])
|
||||
rfc_other_study_group.submission.update(study_group: another_study_group)
|
||||
|
||||
get :index, params: {"q[submission_study_group_id_in][]": my_study_group.id}
|
||||
get :index, params: { "q[submission_study_group_id_in][]": my_study_group.id }
|
||||
|
||||
expect(assigns(:request_for_comments)).to eq([rfc_within_my_study_group])
|
||||
end
|
||||
@ -43,4 +43,14 @@ describe RequestForCommentsController do
|
||||
expect_status(200)
|
||||
expect_template(:index)
|
||||
end
|
||||
|
||||
describe 'GET #get_rfcs_for_exercise' do
|
||||
before do
|
||||
exercise = FactoryBot.create(:even_odd)
|
||||
get :get_rfcs_for_exercise, params: { exercise_id: exercise.id }
|
||||
end
|
||||
|
||||
expect_status(200)
|
||||
expect_template(:index)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user