Sha256: 8d44284794c3b46f1b0d25991c1eb8a563329402fb2625e4478a7b9c44fe81b6

Contents?: true

Size: 1.47 KB

Versions: 7

Compression:

Stored size: 1.47 KB

Contents

describe Unidom::Visitor::Guest, type: :model do

  before :each do
  end

  after :each do
  end

  context do

    model_attributes = {
      platform_code:                    'SITE',
      platform_specific_identification: '123456789012'
    }

    it_behaves_like 'Unidom::Common::Concerns::ModelExtension', model_attributes

    it_behaves_like 'validates text', model_attributes, :platform_specific_identification,
      length: 2..described_class.columns_hash['platform_specific_identification'].limit

    new_platform_specific_identification = 'ABCDEFGHIJKLMNOP'
    it_behaves_like 'scope', :platform_specific_identification_is, [
      { attributes_collection: [ model_attributes                                                                               ], count_diff: 1, args: [ model_attributes[:platform_specific_identification] ] },
      { attributes_collection: [ model_attributes                                                                               ], count_diff: 0, args: [ new_platform_specific_identification                ] },
      { attributes_collection: [ model_attributes.merge(platform_specific_identification: new_platform_specific_identification) ], count_diff: 0, args: [ model_attributes[:platform_specific_identification] ] },
      { attributes_collection: [ model_attributes.merge(platform_specific_identification: new_platform_specific_identification) ], count_diff: 1, args: [ new_platform_specific_identification                ] },
    ]

  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
unidom-visitor-2.0 lib/rspec/models/unidom/visitor/guest_spec.rb
unidom-visitor-1.13.10 lib/rspec/models/unidom/visitor/guest_spec.rb
unidom-visitor-1.13.9 lib/rspec/models/unidom/visitor/guest_spec.rb
unidom-visitor-1.13.8 lib/rspec/models/unidom/visitor/guest_spec.rb
unidom-visitor-1.13.7 lib/rspec/models/unidom/visitor/guest_spec.rb
unidom-visitor-1.13.6 lib/rspec/models/unidom/visitor/guest_spec.rb
unidom-visitor-1.13.5 lib/rspec/models/unidom/visitor/guest_spec.rb