cloudfoundry/cloud_controller_ng

View on GitHub
spec/request/organization_quotas_spec.rb

Summary

Maintainability
D
1 day
Test Coverage

File organization_quotas_spec.rb has 613 lines of code (exceeds 250 allowed). Consider refactoring.
Open

require 'spec_helper'
require 'request_spec_shared_examples'

module VCAP::CloudController
  RSpec.describe 'organization_quotas' do
Severity: Major
Found in spec/request/organization_quotas_spec.rb - About 1 day to fix

    Method generate_default_org_quota_response has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    def generate_default_org_quota_response(global_read)
      # our request specs are seeded with an org that uses the default org quota
      # the visibility of this org depends on the user's permissions
      seeded_org_guid = VCAP::CloudController::Organization.where(name: 'the-system_domain-org-name').first.guid
      seeded_org = global_read ? [{ guid: seeded_org_guid }] : []
    Severity: Minor
    Found in spec/request/organization_quotas_spec.rb - About 1 hr to fix

      Method generate_org_quota_single_response has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      def generate_org_quota_single_response(list_of_orgs)
        {
          guid: organization_quota.guid,
          created_at: iso8601,
          updated_at: iso8601,
      Severity: Minor
      Found in spec/request/organization_quotas_spec.rb - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status