BigW Consortium Gitlab

snippets.rb 380 Bytes
Newer Older
1 2 3
FactoryGirl.define do
  factory :snippet do
    author
Rémy Coutable committed
4 5 6
    title { generate(:title) }
    content { generate(:title) }
    file_name { generate(:filename) }
7 8 9 10 11 12 13 14 15 16 17 18

    trait :public do
      visibility_level Snippet::PUBLIC
    end

    trait :internal do
      visibility_level Snippet::INTERNAL
    end

    trait :private do
      visibility_level Snippet::PRIVATE
    end
19 20
  end
end