Add more coverage for model validations and associations
This commit is contained in:
parent
2bdea8651f
commit
97423a0bed
12 changed files with 96 additions and 50 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue