spec/request/organization_quotas_spec.rb
File organization_quotas_spec.rb
has 613 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
require 'spec_helper'
require 'request_spec_shared_examples'
module VCAP::CloudController
RSpec.describe 'organization_quotas' do
Method generate_default_org_quota_response
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
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 }] : []
Method generate_org_quota_single_response
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def generate_org_quota_single_response(list_of_orgs)
{
guid: organization_quota.guid,
created_at: iso8601,
updated_at: iso8601,