summaryrefslogtreecommitdiff
path: root/spec/support/issuables_list_metadata_shared_examples.rb
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-03-23 14:08:39 +0100
committerRémy Coutable <remy@rymai.me>2017-04-03 18:54:48 +0200
commit4e3516788fdea3de3c5f06e1981ddc518b05d0fb (patch)
treed83183c2dfb8c5082a9d5a9fbcda6a5479c7d9fd /spec/support/issuables_list_metadata_shared_examples.rb
parentca6a7f1e9c9296317315249de9b8b3803d1c6ddc (diff)
downloadgitlab-ce-4e3516788fdea3de3c5f06e1981ddc518b05d0fb.tar.gz
Don't use FFaker in factories, use sequences instead
FFaker can generate data that randomly break our test suite. This simplifies our factories and use sequences which are more predictive. Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/support/issuables_list_metadata_shared_examples.rb')
-rw-r--r--spec/support/issuables_list_metadata_shared_examples.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/support/issuables_list_metadata_shared_examples.rb b/spec/support/issuables_list_metadata_shared_examples.rb
index 4c0f556e736..7ea4073ef2b 100644
--- a/spec/support/issuables_list_metadata_shared_examples.rb
+++ b/spec/support/issuables_list_metadata_shared_examples.rb
@@ -2,12 +2,12 @@ shared_examples 'issuables list meta-data' do |issuable_type, action = nil|
before do
@issuable_ids = []
- 2.times do
+ 2.times do |n|
issuable =
if issuable_type == :issue
create(issuable_type, project: project)
else
- create(issuable_type, title: FFaker::Lorem.sentence, source_project: project, source_branch: FFaker::Name.name)
+ create(issuable_type, source_project: project, source_branch: "#{n}-feature")
end
@issuable_ids << issuable.id