Sha256: 422b763dc9aef205ed3a943714a864a4de7669a9e45e68db325437591e13c0b9

Contents?: true

Size: 1.19 KB

Versions: 25

Compression:

Stored size: 1.19 KB

Contents

# Licensed to Elasticsearch B.V under one or more agreements.
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information

require 'test_helper'

module Elasticsearch
  module Test
    class <%= @module_namespace.map {|n| n.capitalize}.map { |n| n == 'Xpack' ? 'XPack' : n  }.join('') + @method_name.camelize %>Test < ::Test::Unit::TestCase

      context "<%= @module_namespace.map {|n| n.capitalize}.map { |n| n == 'Xpack' ? 'XPack' : n  }.join(' ') + ': ' %><%= @method_name.humanize %>" do
        subject { FakeClient.new }

        should "perform correct request" do
          subject.expects(:perform_request).with do |method, url, params, body|
            assert_equal 'FAKE', method
            assert_equal 'test', url
            assert_equal Hash.new, params
            <%= @spec['body'].nil? ? 'assert_nil   body' : 'assert_equal Hash.new, body' %>
            true
          end.returns(FakeResponse.new)

          subject.<%= @full_namespace.join('.') %> <%= @spec['url']['parts'].select { |name, info| info['required'] }.keys.map { |d| ":#{d} => 'foo'" }.join(', ') rescue '' %>
        end

      end

    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
elasticsearch-api-7.13.3 utils/thor/templates/test.erb
elasticsearch-api-7.13.1 utils/thor/templates/test.erb
elasticsearch-api-7.13.0 utils/thor/templates/test.erb
elasticsearch-api-7.13.0.pre utils/thor/templates/test.erb
elasticsearch-api-7.12.0 utils/thor/templates/test.erb
elasticsearch-api-7.11.2 utils/thor/templates/test.erb
elasticsearch-api-7.11.1 utils/thor/templates/test.erb
elasticsearch-api-7.11.0 utils/thor/templates/test.erb
elasticsearch-api-7.11.0.pre.1 utils/thor/templates/test.erb
elasticsearch-api-7.10.1 utils/thor/templates/test.erb
elasticsearch-api-7.10.0 utils/thor/templates/test.erb
elasticsearch-api-7.10.0.pre utils/thor/templates/test.erb
elasticsearch-api-7.9.0 utils/thor/templates/test.erb
elasticsearch-api-7.8.1 utils/thor/templates/test.erb
elasticsearch-api-7.9.0.pre utils/thor/templates/test.erb
elasticsearch-api-7.8.0 utils/thor/templates/test.erb
elasticsearch-api-7.8.0.pre utils/thor/templates/test.erb
elasticsearch-api-7.7.0 utils/thor/templates/test.erb
elasticsearch-api-7.7.0.pre utils/thor/templates/test.erb
elasticsearch-api-7.6.0 utils/thor/templates/test.erb