Fix Rubocop offenses
This commit is contained in:
@ -314,9 +314,7 @@ describe ExercisesController do
|
||||
before do
|
||||
create(:lti_parameter, external_user: user, exercise:)
|
||||
submission = build(:submission, exercise:, user:)
|
||||
allow(submission).to receive(:normalized_score).and_return(1)
|
||||
allow(submission).to receive(:calculate_score).and_return(scoring_response)
|
||||
allow(submission).to receive(:redirect_to_feedback?).and_return(false)
|
||||
allow(submission).to receive_messages(normalized_score: 1, calculate_score: scoring_response, redirect_to_feedback?: false)
|
||||
allow(Submission).to receive(:create).and_return(submission)
|
||||
end
|
||||
|
||||
|
@ -178,9 +178,8 @@ describe InternalUsersController do
|
||||
describe 'GET #forgot_password' do
|
||||
context 'when no user is logged in' do
|
||||
before do
|
||||
allow(controller).to receive(:set_sentry_context).and_return(nil)
|
||||
allow(controller).to receive_messages(set_sentry_context: nil, current_user: nil)
|
||||
|
||||
allow(controller).to receive(:current_user).and_return(nil)
|
||||
get :forgot_password
|
||||
end
|
||||
|
||||
@ -190,9 +189,8 @@ describe InternalUsersController do
|
||||
|
||||
context 'when a user is already logged in' do
|
||||
before do
|
||||
allow(controller).to receive(:set_sentry_context).and_return(nil)
|
||||
allow(controller).to receive_messages(set_sentry_context: nil, current_user: user)
|
||||
|
||||
allow(controller).to receive(:current_user).and_return(user)
|
||||
get :forgot_password
|
||||
end
|
||||
|
||||
|
@ -227,9 +227,8 @@ describe SessionsController do
|
||||
describe 'GET #new' do
|
||||
context 'when no user is logged in' do
|
||||
before do
|
||||
allow(controller).to receive(:set_sentry_context).and_return(nil)
|
||||
allow(controller).to receive_messages(set_sentry_context: nil, current_user: nil)
|
||||
|
||||
allow(controller).to receive(:current_user).and_return(nil)
|
||||
get :new
|
||||
end
|
||||
|
||||
@ -239,9 +238,8 @@ describe SessionsController do
|
||||
|
||||
context 'when a user is already logged in' do
|
||||
before do
|
||||
allow(controller).to receive(:set_sentry_context).and_return(nil)
|
||||
allow(controller).to receive_messages(set_sentry_context: nil, current_user: build(:teacher))
|
||||
|
||||
allow(controller).to receive(:current_user).and_return(build(:teacher))
|
||||
get :new
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user