Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-12 21:09:28 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-12 21:09:28 +0300
commitce8a0b90849ac5d1895e741c023432930f24d724 (patch)
treedbdc97de542cdbe18a2fc8b1a6b64ac0673ed3d3 /spec/factories
parentdc889678d1de8c09310b2f8f9742bb6c78a6f1a4 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/factories')
-rw-r--r--spec/factories/ci/test_case.rb31
-rw-r--r--spec/factories/user_highest_roles.rb7
2 files changed, 38 insertions, 0 deletions
diff --git a/spec/factories/ci/test_case.rb b/spec/factories/ci/test_case.rb
new file mode 100644
index 00000000000..8017111bcc7
--- /dev/null
+++ b/spec/factories/ci/test_case.rb
@@ -0,0 +1,31 @@
+# frozen_string_literal: true
+
+FactoryBot.define do
+ factory :test_case, class: 'Gitlab::Ci::Reports::TestCase' do
+ name { "test-1" }
+ classname { "trace" }
+ file { "spec/trace_spec.rb" }
+ execution_time { 1.23 }
+ status { "success" }
+ system_output { nil }
+ attachment { nil }
+
+ trait :with_attachment do
+ attachment { "some/path.png" }
+ end
+
+ skip_create
+
+ initialize_with do
+ new(
+ name: name,
+ classname: classname,
+ file: file,
+ execution_time: execution_time,
+ status: status,
+ system_output: system_output,
+ attachment: attachment
+ )
+ end
+ end
+end
diff --git a/spec/factories/user_highest_roles.rb b/spec/factories/user_highest_roles.rb
new file mode 100644
index 00000000000..2e3447348b7
--- /dev/null
+++ b/spec/factories/user_highest_roles.rb
@@ -0,0 +1,7 @@
+# frozen_string_literal: true
+
+FactoryBot.define do
+ factory :user_highest_role do
+ user
+ end
+end