<commit_before>require 'spec_helper'

RSpec.describe Starling::Services::DirectDebitTransactionsService do
  let(:client) { Starling::Client.new(access_token: '<PASSWORD>_access_token') }
  subject(:service) { client.direct_debit_transactions }

  before { stub_user_agent }

  describe '#list' do
    subject(:transactions) { service.list }

    let(:status) { 200 }
    let(:body) { load_fixture('direct_Debit_transactions.json') }
    let(:headers) { { 'Content-Type' => 'application/json' } }

    context 'with no filters' do
      before do
        stub_request(:get,
                     'https://api.starlingbank.com/api/v1/transactions/direct-debit')
          .with(headers: {
                  'Accept' => 'application/json',
                  'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',<commit_msg>Fix broken spec in spec/integration/direct_debit_transactions_spec.rb in Circle<commit_after>require 'spec_helper'

RSpec.describe Starling::Services::DirectDebitTransactionsService do
  let(:client) { Starling::Client.new(access_token: 'dummy_access_token') }
  subject(:service) { client.direct_debit_transactions }

  before { stub_user_agent }

  describe '#list' do
    subject(:transactions) { service.list }

    let(:status) { 200 }
    let(:body) { load_fixture('direct_debit_transactions.json') }
    let(:headers) { { 'Content-Type' => 'application/json' } }

    context 'with no filters' do
      before do
        stub_request(:get,
                     'https://api.starlingbank.com/api/v1/transactions/direct-debit')
          .with(headers: {
                  'Accept' => 'application/json',
                  'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
{'fraction_non_alphanumeric': 0.1411969785008716, 'fraction_numerical': 0.011621150493898896, 'mean_word_length': 3.3484848484848486, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 10, 'https://': 2, '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': '2884998', 'n_tokens_mistral': 567, 'n_tokens_neox': 542, 'n_words': 81}