Factories with a project association use :empty_project
by default
This commit is contained in:
parent
d55839120e
commit
d0315d5393
14 changed files with 15 additions and 14 deletions
|
@ -1,6 +1,6 @@
|
|||
FactoryGirl.define do
|
||||
factory :deploy_keys_project do
|
||||
deploy_key
|
||||
project
|
||||
project factory: :empty_project
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
FactoryGirl.define do
|
||||
factory :event do
|
||||
project
|
||||
project factory: :empty_project
|
||||
author factory: :user
|
||||
|
||||
factory :closed_issue_event do
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
FactoryGirl.define do
|
||||
factory :file_uploader do
|
||||
project
|
||||
project factory: :empty_project
|
||||
secret nil
|
||||
|
||||
transient do
|
||||
|
|
|
@ -6,7 +6,7 @@ FactoryGirl.define do
|
|||
factory :issue do
|
||||
title
|
||||
author
|
||||
project
|
||||
project factory: :empty_project
|
||||
|
||||
trait :confidential do
|
||||
confidential true
|
||||
|
|
|
@ -2,7 +2,7 @@ FactoryGirl.define do
|
|||
factory :label, class: ProjectLabel do
|
||||
sequence(:title) { |n| "label#{n}" }
|
||||
color "#990000"
|
||||
project
|
||||
project factory: :empty_project
|
||||
|
||||
transient do
|
||||
priority nil
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
FactoryGirl.define do
|
||||
factory :milestone do
|
||||
title
|
||||
project
|
||||
project factory: :empty_project
|
||||
|
||||
trait :active do
|
||||
state "active"
|
||||
|
|
|
@ -4,7 +4,7 @@ include ActionDispatch::TestProcess
|
|||
|
||||
FactoryGirl.define do
|
||||
factory :note do
|
||||
project
|
||||
project factory: :empty_project
|
||||
note "Note"
|
||||
author
|
||||
on_issue
|
||||
|
@ -36,6 +36,7 @@ FactoryGirl.define do
|
|||
end
|
||||
|
||||
factory :diff_note_on_commit, traits: [:on_commit], class: DiffNote do
|
||||
association :project, :repository
|
||||
position do
|
||||
Gitlab::Diff::Position.new(
|
||||
old_path: "files/ruby/popen.rb",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
FactoryGirl.define do
|
||||
factory :project_group_link do
|
||||
project
|
||||
project factory: :empty_project
|
||||
group
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
FactoryGirl.define do
|
||||
factory :project_member do
|
||||
user
|
||||
project
|
||||
project factory: :empty_project
|
||||
master
|
||||
|
||||
trait(:guest) { access_level ProjectMember::GUEST }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
FactoryGirl.define do
|
||||
factory :project_snippet, parent: :snippet, class: :ProjectSnippet do
|
||||
project
|
||||
project factory: :empty_project
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2,6 +2,6 @@ FactoryGirl.define do
|
|||
factory :release do
|
||||
tag "v1.1.0"
|
||||
description "Awesome release"
|
||||
project
|
||||
project factory: :empty_project
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
FactoryGirl.define do
|
||||
factory :sent_notification do
|
||||
project
|
||||
project factory: :empty_project
|
||||
recipient factory: :user
|
||||
noteable factory: :issue
|
||||
reply_key "0123456789abcdef" * 2
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
FactoryGirl.define do
|
||||
factory :service do
|
||||
project
|
||||
project factory: :empty_project
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
FactoryGirl.define do
|
||||
factory :todo do
|
||||
project
|
||||
project factory: :empty_project
|
||||
author
|
||||
user
|
||||
target factory: :issue
|
||||
|
|
Loading…
Reference in a new issue