<commit_before>require_relative '../../spec_helper'

describe RestPack::Core::Service::Commands::Application::List do
  is_required :account_id
  is_optional :page, :page_size

  before do
    @applications = create_list(:application, 5)
  end

  context 'listing' do
    let(:response) { subject.class.run(params) }

    context 'by :account_id' do
      before { create_list(:application, 3, account_id: 142857) }

      context 'valid' do
        let(:params) { { account_id: 142857 } }
        it 'returns applications' do
          response.result[:meta][:applications][:count].should == 3
        end
      end

      context 'invalid' do
        let(:params) { { account_id: 999999 } }
        it 'returns no groups' do
          response.result[:meta][:applications][:count].should == 0
        end
      end
    end
  end
end
<commit_msg>spec description fix<commit_after>require_relative '../../spec_helper'

describe RestPack::Core::Service::Commands::Application::List do
  is_required :account_id
  is_optional :page, :page_size

  before do
    @applications = create_list(:application, 5)
  end

  context 'listing' do
    let(:response) { subject.class.run(params) }

    context 'by :account_id' do
      before { create_list(:application, 3, account_id: 142857) }

      context 'valid' do
        let(:params) { { account_id: 142857 } }
        it 'returns correct applications' do
          response.result[:meta][:applications][:count].should == 3
        end
      end

      context 'invalid' do
        let(:params) { { account_id: 999999 } }
        it 'returns no applications' do
          response.result[:meta][:applications][:count].should == 0
        end
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.12011661807580175, 'fraction_numerical': 0.02565597667638484, 'mean_word_length': 2.8475336322869955, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4137637', 'n_tokens_mistral': 552, 'n_tokens_neox': 509, 'n_words': 127}