require 'integration_helper'
require 'mws/products'

class TestMultibyteQueries < IntegrationTest
  def setup
    @api = 'Products'
    super
  end

  def test_posts_multibyte_queries_properly
    ret = clients.map do |client|
      res = client.list_matching_products('félix guattari machinic eros')
      res.parse
    end
    assert ret.map(&:to_s).join.include?('Félix')
  end
end

require 'integration_helper'
require 'mws/products'

class TestMultibyteQueries < IntegrationTest
  def setup
    @api = 'Products'
    super
  end

  def test_posts_multibyte_queries_properly
    ret = clients.map do |client|
      res = client.list_matching_products('félix guattari machinic eros')
      res.body.force_encoding 'UTF-8' if defined? Ox # Ox workaround
      res.parse
    end
    assert ret.map(&:to_s).join.include?('Félix')
  end
end

Work around Ox not parsing multibyte characters
Work around Ox not parsing multibyte characters
