Commit 253b2ac
Changed files (2)
lib
scim
spec
scim
lib/scim/shady.rb
@@ -78,6 +78,15 @@ module Scim
y.uniqueness = :none
end
end
+ schema.add_attribute(name: :display_name, type: :string) do |x|
+ x.multi_valued = false
+ x.description = "The name of the User, suitable for display to end-users. The name SHOULD be the full name of the User being described, if known."
+ x.required = false
+ x.case_exact = false
+ x.mutability = :read_write
+ x.returned = :default
+ x.uniqueness = :none
+ end
super(schemas: [schema])
end
spec/scim/user_spec.rb
@@ -10,7 +10,10 @@ RSpec.describe Scim::Shady::User do
subject.name.middle_name = "Jane"
subject.name.honorific_prefix = "Ms."
subject.name.honorific_suffix = "III"
+ subject.display_name = "Barbara Jensen"
end
specify { expect(subject.to_h[:userName]).to eql(user_name) }
+ specify { expect(subject).to be_valid }
+ specify { subject.valid?; puts subject.errors.full_messages.inspect }
end