Add support for Extended MKCOL (RFC5689)

This commit is contained in:
Brandon Robins
2018-01-03 23:43:07 -06:00
committed by Brandon Robins
parent 46ff7a934f
commit 3b65768e40
14 changed files with 359 additions and 59 deletions

View File

@@ -1,22 +1,29 @@
# frozen_string_literal: true
require 'rails_helper'
require 'support/request_helpers'
RSpec.describe 'Resource' do
context 'base method' do
resource_methods_without_inputs = %w(
resource_methods_without_inputs = %w[
ancestor_exist? collection? create_collection delete_collection etag
exists? lock_is_exclusive? locked? read readable? refresh_lock
creationdate displayname getcontentlanguage getcontentlength getcontenttype
getetag getlastmodified lockdiscovery resourcetype supportedlock
)
resource_methods_with_inputs = %w(
creationdate displayname getcontentlanguage getcontentlength
getcontenttype getetag getlastmodified lockdiscovery resourcetype
supportedlock
]
resource_methods_with_inputs = %w[
copy copy_options lock locked_to_user? propfind proppatch unlock write
)
]
resource_methods_without_inputs.each do |method|
describe "##{method}" do
it 'raises NotImplementedError' do
resource = Calligraphy::Resource.new
expect{resource.send(method)}.to raise_exception(NotImplementedError)
expect { resource.send(method) }.to raise_exception(
NotImplementedError
)
end
end
end
@@ -25,7 +32,10 @@ RSpec.describe 'Resource' do
describe "##{method}" do
it 'raises NotImplementedError' do
resource = Calligraphy::Resource.new
expect{resource.send(method, nil)}.to raise_exception(NotImplementedError)
expect { resource.send(method, nil) }.to raise_exception(
NotImplementedError
)
end
end
end