Showing 1,919 of 4,502 total issues
Block has too many lines. [26/25] Open
it 'returns a report' do
# This function should probably be refactored and moved into a controller
maps = [review_response_map]
allow(ReviewResponseMap).to receive(:where).with(['reviewed_object_id = ?', 1]).and_return(maps)
allow(maps).to receive(:pluck).with('id').and_return(review_response_map.id)
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Block has too many lines. [26/25] Open
context 'when questionnaire_id is not given within attributes' do
it 'returns attributes (args) and does not change @has_errors value when both attributes do not have questionnaire_id specified' do
allow(aq_attributes1).to receive(:[]).with(:questionnaire_id).and_return('')
allow(aq_attributes2).to receive(:[]).with(:questionnaire_id).and_return('')
expect(assignment_form.update_assignment_questionnaires(attributes)).to eq(attributes)
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Block has too many lines. [26/25] Open
describe Bid do
let(:assignment) { create(:assignment, is_intelligent: true, name: 'assignment') }
let(:topic1) { create(:topic, assignment_id: assignment.id) }
let(:topic2) { create(:topic, assignment_id: assignment.id) }
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Block has too many lines. [26/25] Open
context 'When getting properties of metareview_response_map' do
it 'finds version numbers' do
allow(Response).to receive(:find).and_return(response)
allow(MetareviewResponseMap).to receive(:where).and_return([metareview_response_map])
expect(metareview_response_map.get_all_versions).to eq([])
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Block has too many lines. [26/25] Open
describe 'type_and_max' do
context 'when the question is a Checkbox' do
it 'returns 10_003' do
row = VmQuestionResponseRow.new('Some question text', 1, 5, 95, 2)
allow(Question).to receive(:find).with(1).and_return(question)
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Block has too many lines. [26/25] Open
describe '#get_intelligent_topic_row' do
before(:each) do
@assignment = create(:assignment)
@topic1 = create(:topic, topic_name: 'Topic 1', assignment: @assignment)
@topic2 = create(:topic, topic_name: 'Topic 2', assignment: @assignment)
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Block has too many lines. [26/25] Open
it 'should redirect to root with correct recaptcha' do
user_session = { user: student1 }
request_params = {
user: { name: 'lily',
crypted_password: 'password',
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Block has too many lines. [26/25] Open
context 'when params action is edit or update' do
before(:each) do
controller.params = { id: '1', action: 'edit' }
end
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Block has too many lines. [26/25] Open
it 'should redirect to join conference page with incorrect recaptcha' do
user_session = { user: student2 }
request_params = {
user: { name: 'lily2',
crypted_password: 'password',
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Block has too many lines. [26/25] Open
context 'when type is FeedbackResponseMap' do
context 'when assignment varies rubrics by round' do
it 'renders response_report page with corresponding data' do
allow(assignment).to receive(:varying_rubrics_by_round?).and_return(true)
allow(FeedbackResponseMap).to receive(:feedback_response_report)
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Block has too many lines. [26/25] Open
it 'save unsuccessfully' do
expect_any_instance_of(User).to receive(:save).and_return(false)
user_session = { user: admin }
request_params = {
user: { name: 'instructor6',
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Block has too many lines. [26/25] Open
context "when save_advice is called" do
# When ad advice is saved
let(:questionAdvice1) {build(:question_advice, id:1, score: 1, question_id: 1, advice: "Advice1")}
let(:questionAdvice2) {build(:question_advice, id:2, score: 2, question_id: 1, advice: "Advice2")}
let(:questionnaire) do
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Block has too many lines. [26/25] Open
describe '#action_allowed?' do
context 'when user with student privilege following actions should be allowed' do
before(:each) do
controller.request.session[:user] = student
end
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Block has too many lines. [26/25] Open
context 'when params does not have key :assignment_form' do
context 'when assignment is saved successfully' do
it 'shows a note flash message and redirects to tree_display#index page' do
allow(assignment).to receive(:save).and_return(true)
request_params = {
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Block has too many lines. [26/25] Open
describe '#delete' do
before(:each) do
user = build(:instructor)
stub_current_user(user, user.role.name, user.role)
# to deal with redirect fallback_location: root_path
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Block has too many lines. [26/25] Open
describe '#instructor_review' do
context 'when review exists' do
it 'redirects to response#edit page' do
allow(AssignmentParticipant).to receive(:find_or_create_by).with(user_id: 6, parent_id: 1).and_return(participant)
allow(participant).to receive(:new_record?).and_return(false)
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Block has too many lines. [26/25] Open
describe '#save_grade_and_comment_for_submission' do
it 'saves grade and comment for submission and refreshes the grades#view_team page' do
allow(AssignmentParticipant).to receive(:find_by).with(id: '1').and_return(participant)
allow(participant).to receive(:team).and_return(build(:assignment_team, id: 2, parent_id: 8))
request_params = {
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Block has too many lines. [26/25] Open
describe '#action_allowed?' do
context 'when current user is student' do
it 'allows update_duties action' do
controller.params = { action: 'update_duties' }
user = student
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Block has too many lines. [26/25] Open
it 'has participants, has team id' do
allow(Participant).to receive(:find_by).and_return(participant)
allow(controller).to receive(:calculate_penalty).and_return({ submission: 0, review: 0, meta_review: 0 })
allow(course).to receive(:assignments).and_return(assignment_with_participants_list)
allow(assignment_with_participants_list).to receive(:reject).and_return(assignment_with_participants_list)
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.
Block has too many lines. [26/25] Open
before(:each) do
@questionnaire1 = double('Questionnaire', id: 1)
allow(Questionnaire).to receive(:find).with('1').and_return(@questionnaire1)
@request_params = { id: 1,
questionnaire: { name: 'test questionnaire',
- Read upRead up
- Exclude checks
This cop checks if the length of a block exceeds some maximum value. Comment lines can optionally be ignored. The maximum allowed length is configurable. The cop can be configured to ignore blocks passed to certain methods.