Sha256: c48fff9badab3d83f49afe5ce5e77c32c436d46e4beb9fb582815a60e82ed725

Contents?: true

Size: 793 Bytes

Versions: 7

Compression:

Stored size: 793 Bytes

Contents

# frozen_string_literal: true

require 'test_helper'
require 'smartling/strings'

describe Smartling::Strings do
  let(:smartling) do
    Class.new(Minitest::Mock) do
      include Smartling::Strings
    end.new
  end

  describe 'source_strings' do
    it 'lists files the items of the smartling files result' do
      smartling.expect(:get, nil) do |path, query:|
        assert_equal path, '/strings-api/v2/projects/1/source-strings'
        assert_equal 'x', query.fetch(:fileUri)
        assert_equal ['a'], query.fetch(:stringHashcodes)
        assert_equal 99, query.fetch(:limit)
        assert_equal 2, query.fetch(:offset)
      end
      smartling.source_strings(project_id: 1, file_uri: 'x', hashcodes: ['a'],
                               limit: 99, offset: 2)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
smartring-0.0.7 test/smartling/strings_test.rb
smartring-0.0.6 test/smartling/strings_test.rb
smartring-0.0.5 test/smartling/strings_test.rb
smartring-0.0.4 test/smartling/strings_test.rb
smartring-0.0.3 test/smartling/strings_test.rb
smartring-0.0.2 test/smartling/strings_test.rb
smartring-0.0.1 test/smartling/strings_test.rb