diff options
author | Paco Guzman <pacoguzmanp@gmail.com> | 2016-09-12 16:11:49 +0300 |
---|---|---|
committer | Paco Guzman <pacoguzmanp@gmail.com> | 2016-09-12 16:44:41 +0300 |
commit | b7814205dc3aed8e1f405c43a63e376fec726112 (patch) | |
tree | b99638d81b366c4925c4b606a83a95f0db50874b /spec/factories/issues.rb | |
parent | 45afdbef0de58f6de207b057e47151611d2ad7e6 (diff) |
Ensure specs on sorting of issues in API are deterministic on MySQL
MySQL could not have support for millisecond precision, depends on the MySQL version
so we just create issues in different seconds in a deterministic way
Diffstat (limited to 'spec/factories/issues.rb')
-rw-r--r-- | spec/factories/issues.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/factories/issues.rb b/spec/factories/issues.rb index 2c0a2dd94ca..2b4670be468 100644 --- a/spec/factories/issues.rb +++ b/spec/factories/issues.rb @@ -1,4 +1,8 @@ FactoryGirl.define do + sequence :issue_created_at do |n| + 4.hours.ago + ( 2 * n ).seconds + end + factory :issue do title author |