Sha256: 3bb1dfc22fadb9d5a35a5b0f5635796f162cd7e263011184c27ded9705926f66

Contents?: true

Size: 691 Bytes

Versions: 63

Compression:

Stored size: 691 Bytes

Contents

require 'test_helper'

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

      context "Render search 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 '_render/template', url
            assert_equal({ :id => 'foo' }, params)
            assert_equal({ :foo => 'bar' }, body)
            true
          end.returns(FakeResponse.new)

          subject.render_search_template :id => 'foo', :body => { :foo => 'bar' }
        end
      end

    end
  end
end

Version data entries

63 entries across 63 versions & 6 rubygems

Version Path
elasticsearch-api-1.0.16.pre test/unit/render_search_template_test.rb
elasticsearch-api-1.0.15 test/unit/render_search_template_test.rb
elasticsearch-api-1.0.14 test/unit/render_search_template_test.rb