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