Commit d5183d2
Changed files (2)
lib
scim
kit
v2
spec
scim
kit
lib/scim/kit/v2/resource.rb
@@ -12,10 +12,12 @@ module Scim
attr_reader :meta
attr_reader :schemas
- def initialize(schema:, location:)
- @meta = Meta.new(schema.name, location)
- @schemas = [schema]
- define_attributes_for(schema.attributes)
+ def initialize(schemas:, location:)
+ @meta = Meta.new(schemas[0].name, location)
+ @schemas = schemas
+ schemas.each do |schema|
+ define_attributes_for(schema.attributes)
+ end
end
end
end
spec/scim/kit/v2/resource_spec.rb
@@ -1,7 +1,7 @@
# frozen_string_literal: true
RSpec.describe Scim::Kit::V2::Resource do
- subject { described_class.new(schema: schema, location: resource_location) }
+ subject { described_class.new(schemas: [schema], location: resource_location) }
let(:schema) { Scim::Kit::V2::Schema.new(id: Scim::Kit::V2::Schemas::USER, name: 'User', location: FFaker::Internet.uri('https')) }
let(:resource_location) { FFaker::Internet.uri('https') }