From bf286d1172430051cf12ad2e1bbe27c063b7d74d Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Fri, 29 Mar 2019 20:57:45 -0700 Subject: [PATCH] Fix failing spec in spec/features/users/login_spec.rb This spec would start to fail on the first of the month because the generated text would have a zero-padded day (e.g. 01 vs 1), whereas the expected text check used an unpadded day via the `-d` parameter in strftime (https://apidock.com/ruby/Date/strftime). To fix this, we use use the `d` parameter to pad zeros. This spec was introduced recently in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/25731. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/59731 --- spec/features/users/login_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/features/users/login_spec.rb b/spec/features/users/login_spec.rb index 368a814874f..9d5780d29b0 100644 --- a/spec/features/users/login_spec.rb +++ b/spec/features/users/login_spec.rb @@ -447,7 +447,7 @@ describe 'Login' do 'You can leave Group 1 and leave Group 2. '\ 'You need to do this '\ 'before '\ - "#{(Time.zone.now + 2.days).strftime("%a, %-d %b %Y %H:%M:%S %z")}" + "#{(Time.zone.now + 2.days).strftime("%a, %d %b %Y %H:%M:%S %z")}" ) end end