diff options
author | Ahmad Sherif <me@ahmadsherif.com> | 2018-01-24 19:52:44 +0300 |
---|---|---|
committer | Ahmad Sherif <me@ahmadsherif.com> | 2018-01-24 23:14:11 +0300 |
commit | 5735747050543a9e68aeb8f017c995e6119a9510 (patch) | |
tree | f37567f29d5504c57f5f666f8d52d0ea0a75c988 /spec | |
parent | a403011e4f7adae339a3a8584e22a75f4872c3c5 (diff) |
Add formatted_data attribute to Git::WikiPage
Related to #39805
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/wiki_page_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/models/wiki_page_spec.rb b/spec/models/wiki_page_spec.rb index ea75434e399..cc9d79da708 100644 --- a/spec/models/wiki_page_spec.rb +++ b/spec/models/wiki_page_spec.rb @@ -386,6 +386,17 @@ describe WikiPage do end end + describe '#formatted_content' do + it 'returns processed content of the page', :disable_gitaly do + subject.create({ title: "RDoc", content: "*bold*", format: "rdoc" }) + page = wiki.find_page('RDoc') + + expect(page.formatted_content).to eq("\n<p><strong>bold</strong></p>\n") + + destroy_page('RDoc') + end + end + private def remove_temp_repo(path) |