Sha256: 072dcfd7558f3141659f128da5303a1d5d5c0593b3b92814522ccc91b16c89ab
Contents?: true
Size: 1006 Bytes
Versions: 77
Compression:
Stored size: 1006 Bytes
Contents
require 'test_helper' module Elasticsearch module Test class SnapshotGetTest < ::Test::Unit::TestCase context "Snapshot: Get" do subject { FakeClient.new } should "require the :repository argument" do assert_raise ArgumentError do subject.snapshot.get :snapshot => 'bar', :body => {} end end should "require the :snapshot argument" do assert_raise ArgumentError do subject.snapshot.get :repository => 'foo', :body => {} end end should "perform correct request" do subject.expects(:perform_request).with do |method, url, params, body| assert_equal 'GET', method assert_equal '_snapshot/foo/bar', url assert_equal Hash.new, params assert_nil body true end.returns(FakeResponse.new) subject.snapshot.get :repository => 'foo', :snapshot => 'bar' end end end end end
Version data entries
77 entries across 77 versions & 6 rubygems