gitlab-org--gitlab-foss/spec/factories/snippets.rb
Rémy Coutable 169dc4cec1 Fix brittle specs
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-04-03 18:54:48 +02:00

20 lines
380 B
Ruby

FactoryGirl.define do
factory :snippet do
author
title { generate(:title) }
content { generate(:title) }
file_name { generate(:filename) }
trait :public do
visibility_level Snippet::PUBLIC
end
trait :internal do
visibility_level Snippet::INTERNAL
end
trait :private do
visibility_level Snippet::PRIVATE
end
end
end