summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-02-14 19:09:52 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2017-02-14 19:09:52 +0000
commitefc82ebf3f7378f848b65c0a45a4052316bfd6db (patch)
treee5df1ae3557663b5584b6488b6db7e9a1a03ef33 /spec/models
parent6676b4f0dd05ffb6071a3329cca4459e7cddcdc3 (diff)
parentad5e772bddd7b417fa7a36629db02c69b1b9864d (diff)
downloadgitlab-ce-efc82ebf3f7378f848b65c0a45a4052316bfd6db.tar.gz
Merge branch 'master' into 'dz-nested-groups-improvements-3'
# Conflicts: # doc/api/projects.md
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/wiki_page_spec.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/models/wiki_page_spec.rb b/spec/models/wiki_page_spec.rb
index 579ebac7afb..753dc938c52 100644
--- a/spec/models/wiki_page_spec.rb
+++ b/spec/models/wiki_page_spec.rb
@@ -318,6 +318,19 @@ describe WikiPage, models: true do
end
end
+ describe '#==' do
+ let(:original_wiki_page) { create(:wiki_page) }
+
+ it 'returns true for identical wiki page' do
+ expect(original_wiki_page).to eq(original_wiki_page)
+ end
+
+ it 'returns false for updated wiki page' do
+ updated_wiki_page = original_wiki_page.update("Updated content")
+ expect(original_wiki_page).not_to eq(updated_wiki_page)
+ end
+ end
+
private
def remove_temp_repo(path)