diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-11 03:10:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-11 03:10:11 +0300 |
commit | 7303dddd09bf28d28e36666f0cc2775e9fa27872 (patch) | |
tree | c97552993de10857894e26c7f0c6b412496a063b /spec/models | |
parent | 997968e3fa7d1f623f7bd9e2581c58dc7afc5aa5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/wiki_page_spec.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/models/wiki_page_spec.rb b/spec/models/wiki_page_spec.rb index c626f98f874..ee61f191f05 100644 --- a/spec/models/wiki_page_spec.rb +++ b/spec/models/wiki_page_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -RSpec.describe WikiPage do +RSpec.describe WikiPage, feature_category: :wiki do let(:user) { create(:user) } let(:container) { create(:project) } let(:wiki) { container.wiki } @@ -830,13 +830,21 @@ RSpec.describe WikiPage do expect(subject.content_changed?).to be(true) end - it 'returns false if only the newline format has changed' do + it 'returns false if only the newline format has changed from LF to CRLF' do expect(subject.page).to receive(:text_data).and_return("foo\nbar") subject.attributes[:content] = "foo\r\nbar" expect(subject.content_changed?).to be(false) end + + it 'returns false if only the newline format has changed from CRLF to LF' do + expect(subject.page).to receive(:text_data).and_return("foo\r\nbar") + + subject.attributes[:content] = "foo\nbar" + + expect(subject.content_changed?).to be(false) + end end end |