summaryrefslogtreecommitdiff
path: root/spec/factories.rb
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2012-08-29 11:36:02 -0400
committerRobert Speicher <rspeicher@gmail.com>2012-08-29 11:36:02 -0400
commit97423a0bed1148f65f9ed2bd8bf540e764d9576c (patch)
treed91a67a6a863a97b8cf2acd76b01c18de08c2dc5 /spec/factories.rb
parent2bdea8651fa3bd82418986ada84828c22d451405 (diff)
downloadgitlab-ce-97423a0bed1148f65f9ed2bd8bf540e764d9576c.tar.gz
Add more coverage for model validations and associations
Diffstat (limited to 'spec/factories.rb')
-rw-r--r--spec/factories.rb13
1 files changed, 11 insertions, 2 deletions
diff --git a/spec/factories.rb b/spec/factories.rb
index 3f9673b499e..2e4acf39461 100644
--- a/spec/factories.rb
+++ b/spec/factories.rb
@@ -18,11 +18,15 @@ FactoryGirl.define do
Faker::Lorem.sentence
end
+ sequence :name, aliases: [:file_name] do
+ Faker::Name.name
+ end
+
sequence(:url) { Faker::Internet.uri('http') }
factory :user, aliases: [:author, :assignee, :owner] do
email { Faker::Internet.email }
- name { Faker::Name.name }
+ name
password "123456"
password_confirmation "123456"
@@ -116,6 +120,11 @@ FactoryGirl.define do
author
title
content
- file_name { Faker::Lorem.sentence }
+ file_name
+ end
+
+ factory :protected_branch do
+ name
+ project
end
end