debian-mirror-gitlab/spec/factories/snippets.rb

29 lines
453 B
Ruby
Raw Normal View History

2016-06-02 11:05:42 +05:30
FactoryGirl.define do
sequence :title, aliases: [:content] do
FFaker::Lorem.sentence
end
sequence :file_name do
FFaker::Internet.user_name
end
factory :snippet do
author
title
content
file_name
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