Sha256: 6e05ca21226ae22783e57cf1fe864ce1346f2600c1fafe5ae46abcdcb72d498b

Contents?: true

Size: 790 Bytes

Versions: 4

Compression:

Stored size: 790 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe DeepL::Requests::Glossary::LanguagePairs do
  let(:api) { build_deepl_api }
  let(:options) { {} }
  subject { DeepL::Requests::Glossary::LanguagePairs.new(api, options) }

  describe '#initialize' do
    context 'When building a request' do
      it 'should create a request object' do
        expect(subject).to be_a(described_class)
      end
    end
  end

  describe '#request' do
    around do |example|
      VCR.use_cassette('glossaries') { example.call }
    end

    context 'When requesting a list of all language pairs supported by glossaries' do
      it 'should return a language pairs object' do
        language_pairs = subject.request
        expect(language_pairs).to be_an(Array)
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
deepl-rb-2.5.3 spec/requests/glossary/language_pairs_spec.rb
deepl-rb-2.5.2 spec/requests/glossary/language_pairs_spec.rb
deepl-rb-2.5.1 spec/requests/glossary/language_pairs_spec.rb
deepl-rb-2.5.0 spec/requests/glossary/language_pairs_spec.rb