AyuntamientoMadrid/participacion

View on GitHub

Showing 143 of 1,085 total issues

File budget_investments_spec.rb has 1409 lines of code (exceeds 250 allowed). Consider refactoring.
Open

require "rails_helper"

describe "Admin budget investments", :admin do
  let(:budget) { create(:budget) }
  let(:administrator) do
Severity: Major
Found in spec/system/admin/budget_investments_spec.rb - About 3 days to fix

    File investments_spec.rb has 1343 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    require "rails_helper"
    require "sessions_helper"
    
    describe "Budget Investments" do
      let(:author)  { create(:user, :level_two, username: "Isabel") }
    Severity: Major
    Found in spec/system/budgets/investments_spec.rb - About 3 days to fix

      File proposals_spec.rb has 1281 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      require "rails_helper"
      
      describe "Proposals" do
        it_behaves_like "milestoneable", :proposal
      
      
      Severity: Major
      Found in spec/system/proposals_spec.rb - About 3 days to fix

        File investment_spec.rb has 1084 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        require "rails_helper"
        
        describe Budget::Investment do
          let(:investment) { build(:budget_investment) }
        
        
        Severity: Major
        Found in spec/models/budget/investment_spec.rb - About 2 days to fix

          File user_spec.rb has 860 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          require "rails_helper"
          
          describe User do
            describe "#headings_voted_within_group" do
              it "returns the headings voted by a user" do
          Severity: Major
          Found in spec/models/user_spec.rb - About 2 days to fix

            File proposal_spec.rb has 817 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            require "rails_helper"
            
            describe Proposal do
              let(:proposal) { build(:proposal) }
            
            
            Severity: Major
            Found in spec/models/proposal_spec.rb - About 1 day to fix

              File debates_spec.rb has 630 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              require "rails_helper"
              
              describe "Debates" do
                context "Concerns" do
                  it_behaves_like "notifiable in-app", :debate
              Severity: Major
              Found in spec/system/debates_spec.rb - About 1 day to fix

                File debate_spec.rb has 593 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                require "rails_helper"
                
                describe Debate do
                  let(:debate) { build(:debate) }
                
                
                Severity: Major
                Found in spec/models/debate_spec.rb - About 1 day to fix

                  File comments_spec.rb has 553 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  require "rails_helper"
                  
                  describe "Comments" do
                    factories = [
                      :budget_investment,
                  Severity: Major
                  Found in spec/system/comments_spec.rb - About 1 day to fix

                    File ballots_spec.rb has 532 lines of code (exceeds 250 allowed). Consider refactoring.
                    Open

                    require "rails_helper"
                    require "sessions_helper"
                    
                    describe "Ballots" do
                      let(:user)        { create(:user, :level_two) }
                    Severity: Major
                    Found in spec/system/budgets/ballots_spec.rb - About 1 day to fix

                      File users_auth_spec.rb has 511 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      require "rails_helper"
                      
                      describe "Users" do
                        context "Regular authentication" do
                          context "Sign up" do
                      Severity: Major
                      Found in spec/system/users_auth_spec.rb - About 1 day to fix

                        File machine_learning_spec.rb has 484 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        require "rails_helper"
                        
                        describe MachineLearning do
                          def full_sanitizer(string)
                            ActionView::Base.full_sanitizer.sanitize(string)
                        Severity: Minor
                        Found in spec/models/machine_learning_spec.rb - About 7 hrs to fix

                          Class Investment has 51 methods (exceeds 20 allowed). Consider refactoring.
                          Open

                            class Investment < ApplicationRecord
                              SORTING_OPTIONS = { id: "id", supports: "cached_votes_up" }.freeze
                          
                              include Measurable
                              include Sanitizable
                          Severity: Major
                          Found in app/models/budget/investment.rb - About 7 hrs to fix

                            File poll_spec.rb has 461 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            require "rails_helper"
                            
                            describe Poll do
                              let(:poll) { build(:poll, :future) }
                            
                            
                            Severity: Minor
                            Found in spec/models/poll/poll_spec.rb - About 7 hrs to fix

                              File budget_spec.rb has 434 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              require "rails_helper"
                              
                              describe Budget do
                                let(:budget) { create(:budget) }
                              
                              
                              Severity: Minor
                              Found in spec/models/budget_spec.rb - About 6 hrs to fix

                                File query_type_spec.rb has 434 lines of code (exceeds 250 allowed). Consider refactoring.
                                Open

                                require "rails_helper"
                                
                                describe Types::QueryType do
                                  let(:user) { create(:user) }
                                  let(:proposal) { create(:proposal, author: user) }
                                Severity: Minor
                                Found in spec/graphql/types/query_type_spec.rb - About 6 hrs to fix

                                  File polls_spec.rb has 431 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  require "rails_helper"
                                  
                                  describe "Admin polls", :admin do
                                    scenario "Index empty" do
                                      visit admin_root_path
                                  Severity: Minor
                                  Found in spec/system/admin/poll/polls_spec.rb - About 6 hrs to fix

                                    Class MachineLearning has 45 methods (exceeds 20 allowed). Consider refactoring.
                                    Open

                                    class MachineLearning
                                      attr_reader :user, :script, :previous_modified_date
                                      attr_accessor :job
                                    
                                      SCRIPTS_FOLDER = Rails.root.join("public", "machine_learning", "scripts").freeze
                                    Severity: Minor
                                    Found in app/models/machine_learning.rb - About 6 hrs to fix

                                      File budget_investments_spec.rb has 418 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      require "rails_helper"
                                      
                                      describe "Budget Investments" do
                                        let(:manager) { create(:manager) }
                                        let(:budget)  { create(:budget, :selecting, name: "2033", slug: "budget_slug") }
                                      Severity: Minor
                                      Found in spec/system/management/budget_investments_spec.rb - About 6 hrs to fix

                                        File dashboard_spec.rb has 414 lines of code (exceeds 250 allowed). Consider refactoring.
                                        Open

                                        require "rails_helper"
                                        
                                        describe "Proposal's dashboard" do
                                          let(:proposal) { create(:proposal, :draft) }
                                          before { login_as(proposal.author) }
                                        Severity: Minor
                                        Found in spec/system/dashboard/dashboard_spec.rb - About 5 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language