Commit f5c6b09
Changed files (2)
lib
scim
spec
lib/scim/shady/service_provider_configuration.rb
@@ -1,6 +1,8 @@
module Scim
module Shady
class ServiceProviderConfiguration
+ include Buildable
+
def initialize(json)
@json = json
end
@@ -60,6 +62,10 @@ module Scim
def to_json
@json
end
+
+ def self.builder_class
+ Scim::Shady::Builders::ServiceProviderConfiguration
+ end
end
end
end
spec/scim/service_provider_configuration_spec.rb
@@ -0,0 +1,19 @@
+RSpec.describe Scim::Shady::ServiceProviderConfiguration do
+ describe ".build" do
+ subject { described_class }
+
+ it 'builds a configuration' do
+ result = subject.build do |builder|
+ builder.bulk do |x|
+ x.supported = true
+ x.max_operations = 1_000
+ x.max_payload_size = 1_048_576
+ end
+ end
+
+ expect(result.bulk_supported).to be(true)
+ expect(result.bulk_max_operations).to eql(1_000)
+ expect(result.bulk_max_payload_size).to eql(1_048_576)
+ end
+ end
+end