diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2017-05-03 22:39:41 -0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2017-05-04 15:36:04 -0300 |
commit | 56db54d3e53f5bac4aa5190d3189f015e3fdbfa7 (patch) | |
tree | 9cacf9ea5213cd5becef50257d89589e2f68c1c2 /spec/models/project_spec.rb | |
parent | 341964da45460d5c6593d0e08178ecf61e726e91 (diff) | |
download | gitlab-ce-56db54d3e53f5bac4aa5190d3189f015e3fdbfa7.tar.gz |
Set last_repository_updated_at to created_at upon project creation
Diffstat (limited to 'spec/models/project_spec.rb')
-rw-r--r-- | spec/models/project_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index 36ce3070a6e..316ece87faa 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -1925,4 +1925,12 @@ describe Project, models: true do not_to raise_error end end + + describe '#last_repository_updated_at' do + it 'sets to created_at upon creation' do + project = create(:empty_project, created_at: 2.hours.ago) + + expect(project.last_repository_updated_at.to_i).to eq(project.created_at.to_i) + end + end end |