expertiza/expertiza

View on GitHub
spec/controllers/invitations_controller_spec.rb

Summary

Maintainability
A
0 mins
Test Coverage

Block has too many lines. [137/25]
Open

describe InvitationsController do
  let(:instructor) { build(:instructor, id: 6) }
  let(:student) { build(:student, parent_id: 2, id: 1) }
  let(:student1) { build(:student, id: 2) }
  let(:admin) { build(:admin) }

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. [59/25]
Open

  describe '#check_user_before_invitation' do
    it 'invitation added for existing user' do
      allow(User).to receive(:find_by).with(name: 'student@gmail.com').and_return(student)
      allow(AssignmentParticipant).to receive(:find).with('1').and_return(participant)
      allow(Assignment).to receive(:find).with(1).and_return(assignment)

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. [28/25]
Open

  describe '#action_allowed?' do
    context 'when current user is student' do
      it 'allows the actions' do
        user = student
        stub_current_user(user, user.role.name, user.role)

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.

There are no issues that match your filters.

Category
Status