Sha256: 0908ca3317e266436e9a5dcb1fc08dc559cec7f32954f2041ce2ff3c14f13410

Contents?: true

Size: 507 Bytes

Versions: 2

Compression:

Stored size: 507 Bytes

Contents

# frozen_string_literal: true

FactoryGirl.define do
  factory :structure_page, class: Structure do
    title 'Structure'
    slug { FactoryGirl.generate(:slug) }
    structure_type StructureType.page
    position_type PositionType.menu
    is_visible true
  end

  factory :structure_main, class: Structure do
    title 'Main page'
    slug 'main-page'
    structure_type StructureType.main
    position_type PositionType.default
    is_visible true
  end

  sequence :slug do |n|
    "slug#{n}"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sunrise-cms-1.1.1 lib/generators/sunrise/templates/spec/factories/structure_factory.rb
sunrise-cms-1.1.0 lib/generators/sunrise/templates/spec/factories/structure_factory.rb