Sha256: f9a74c20e753357507992370df2f898d5f9bea0e4923ed321aafe92d481e61d8

Contents?: true

Size: 582 Bytes

Versions: 35

Compression:

Stored size: 582 Bytes

Contents

require 'spec_helper'

RSpec.describe Scimitar::ComplexTypes::Email do
  context '#as_json' do
    it 'assumes no defaults' do
      expect(described_class.new.as_json).to eq({})
    end

    it 'allows a custom email type' do
      expect(described_class.new(type: 'home').as_json).to eq('type' => 'home')
    end

    it 'allows a non-primary email' do
      expect(described_class.new(primary: false).as_json).to eq('primary' => false)
    end

    it 'shows the set email' do
      expect(described_class.new(value: 'a@b.c').as_json).to eq('value' => 'a@b.c')
    end
  end
end

Version data entries

35 entries across 35 versions & 2 rubygems

Version Path
scimitar-1.11.0 spec/models/scimitar/complex_types/email_spec.rb
scimitar-2.10.0 spec/models/scimitar/complex_types/email_spec.rb
scimitar-1.10.0 spec/models/scimitar/complex_types/email_spec.rb
scimitar-2.9.0 spec/models/scimitar/complex_types/email_spec.rb
scimitar-2.8.0 spec/models/scimitar/complex_types/email_spec.rb
scimitar-2.7.3 spec/models/scimitar/complex_types/email_spec.rb
powerhome-scimitar-1.0.0 spec/models/scimitar/complex_types/email_spec.rb
scimitar-2.7.2 spec/models/scimitar/complex_types/email_spec.rb
scimitar-1.8.2 spec/models/scimitar/complex_types/email_spec.rb
scimitar-1.8.1 spec/models/scimitar/complex_types/email_spec.rb
scimitar-2.7.1 spec/models/scimitar/complex_types/email_spec.rb
scimitar-1.8.0 spec/models/scimitar/complex_types/email_spec.rb
scimitar-2.7.0 spec/models/scimitar/complex_types/email_spec.rb
scimitar-1.7.1 spec/models/scimitar/complex_types/email_spec.rb
scimitar-2.6.1 spec/models/scimitar/complex_types/email_spec.rb
scimitar-1.7.0 spec/models/scimitar/complex_types/email_spec.rb
scimitar-2.6.0 spec/models/scimitar/complex_types/email_spec.rb
scimitar-1.6.0 spec/models/scimitar/complex_types/email_spec.rb
scimitar-2.5.0 spec/models/scimitar/complex_types/email_spec.rb
scimitar-2.4.3 spec/models/scimitar/complex_types/email_spec.rb