diff options
author | Rémy Coutable <remy@rymai.me> | 2017-03-14 17:13:21 +0100 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-03-14 17:13:21 +0100 |
commit | b931dc8b9dbfa6b0ad90b12cdf28cbd68c4da80a (patch) | |
tree | a697d659e75c531b91fd6c941aaa1bb2b4473e43 | |
parent | ffcddb295950729dbc4ee7a3c0e32f7dec00da99 (diff) | |
download | gitlab-ce-25837-fix-transient-failure.tar.gz |
Remove trailing `.` from user names created by FactoryGirl25837-fix-transient-failure
This prevent transient failures in Git-related specs.
Signed-off-by: Rémy Coutable <remy@rymai.me>
-rw-r--r-- | spec/factories/users.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/factories/users.rb b/spec/factories/users.rb index 249dabbaae8..aa4697580fd 100644 --- a/spec/factories/users.rb +++ b/spec/factories/users.rb @@ -1,5 +1,16 @@ FactoryGirl.define do - sequence(:name) { FFaker::Name.name } + # Git remove periods from the end of the name so we remove it too so we don't + # have false-negative in specs that expect against author/commiter name: + # + # $ git commit --author='Foo Sr. <foo@example.com>' -m 'Where's my trailing period?' + # + # results in this: + # + # $ git show --pretty + # ... + # Author: Foo Sr <foo@example.com> + # ... + sequence(:name) { FFaker::Name.name.chomp("\.") } factory :user, aliases: [:author, :assignee, :recipient, :owner, :creator, :resource_owner] do email { FFaker::Internet.email } |