summaryrefslogtreecommitdiff
path: root/spec/models/wiki_page_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-05-12 03:09:31 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-12 03:09:31 +0000
commit0e30d318bbe0e9e94885f865db3372e758c512bb (patch)
tree52e43494bbab87ebbe07669cddfdbf36298ae9fd /spec/models/wiki_page_spec.rb
parentc6f0b221b71133792f2c9e5a026f3744c16d5ef5 (diff)
downloadgitlab-ce-0e30d318bbe0e9e94885f865db3372e758c512bb.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/wiki_page_spec.rb')
-rw-r--r--spec/models/wiki_page_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/models/wiki_page_spec.rb b/spec/models/wiki_page_spec.rb
index eb241fa123f..305b67a4262 100644
--- a/spec/models/wiki_page_spec.rb
+++ b/spec/models/wiki_page_spec.rb
@@ -844,6 +844,20 @@ describe WikiPage do
end
end
+ describe '#version_commit_timestamp' do
+ context 'for a new page' do
+ it 'returns nil' do
+ expect(new_page.version_commit_timestamp).to be_nil
+ end
+ end
+
+ context 'for page that exists' do
+ it 'returns the timestamp of the commit' do
+ expect(existing_page.version_commit_timestamp).to eq(existing_page.version.commit.committed_date)
+ end
+ end
+ end
+
private
def get_slugs(page_or_dir)