spec/models/scimitar/schema/attribute_spec.rb in scimitar-2.1.1 vs spec/models/scimitar/schema/attribute_spec.rb in scimitar-2.1.3

- old
+ new

@@ -19,14 +19,12 @@ it 'transforms complexTypes into subAttributes' do name = described_class.new(name: 'name', complexType: Scimitar::ComplexTypes::Name) expect(name.type).to eql('complex') expect(name.subAttributes).to eql(Scimitar::Schema::Name.scim_attributes) end - end - context '#valid?' do it 'is invalid if attribute is required but value is blank' do attribute = described_class.new(name: 'userName', type: 'string', required: true) expect(attribute.valid?(nil)).to be(false) expect(attribute.errors.messages.to_h).to eql({userName: ['is required']}) @@ -74,7 +72,6 @@ end it 'is not valid if type is dateTime and given value is not a valid date' do expect(described_class.new(name: 'startDate', type: 'dateTime').valid?('gaga')).to be(false) end end - end