Sha256: bf4b99b66b4d28a9e4deae0a6a60e6cb005667b7e5c586f74f283ecabc89d973

Contents?: true

Size: 711 Bytes

Versions: 5

Compression:

Stored size: 711 Bytes

Contents

describe Unidom::Score::ScoreSheetTemplate, type: :model do

  before :each do
  end

  after :each do
  end

  context do

    model_attributes = {
      subject_id:   SecureRandom.uuid,
      subject_type: 'Unidom::Score::Subject::Mock',
      name:         'Some Name',
      score:        100.00
    }

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

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

    it_behaves_like 'validates numericality', model_attributes, :score,
      range: -1_000_000_000..1_000_000_000, minimum_inclusive: true, maximum_inclusive: true, only_integer: false

  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
unidom-score-2.0 lib/rspec/models/unidom/score/score_sheet_template_spec.rb
unidom-score-1.1.8 lib/rspec/models/unidom/score/score_sheet_template_spec.rb
unidom-score-1.1.7 lib/rspec/models/unidom/score/score_sheet_template_spec.rb
unidom-score-1.1.6 lib/rspec/models/unidom/score/score_sheet_template_spec.rb
unidom-score-1.1.5 lib/rspec/models/unidom/score/score_sheet_template_spec.rb