Sha256: 7e50500fbd6d2e886522e124c1be2dd11e23308ff976fd34d5a2b8cc76859682

Contents?: true

Size: 610 Bytes

Versions: 6

Compression:

Stored size: 610 Bytes

Contents

require 'test_helper'

module Elasticsearch
  module Test
    class GetTemplateTest < ::Test::Unit::TestCase

      context "Get template" do
        subject { FakeClient.new }

        should "perform correct request" do
          subject.expects(:perform_request).with do |method, url, params, body|
            assert_equal 'GET', method
            assert_equal '_search/template/foo', url
            assert_equal Hash.new, params
            assert_nil   body
            true
          end.returns(FakeResponse.new)

          subject.get_template :id => "foo"
        end

      end

    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
elasticsearch-api-1.0.11 test/unit/get_template_test.rb
elasticsearch-api-1.0.10 test/unit/get_template_test.rb
elasticsearch-api-1.0.9 test/unit/get_template_test.rb
elasticsearch-api-1.0.7 test/unit/get_template_test.rb
elasticsearch-api-1.0.6 test/unit/get_template_test.rb
elasticsearch-api-1.0.5 test/unit/get_template_test.rb