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