summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Braha Stoll <alexbrahastoll@gmail.com>2016-12-27 01:52:50 -0200
committerAlex Braha Stoll <alexbrahastoll@gmail.com>2016-12-31 16:55:50 -0200
commit104bfa2a3187aefebd4a53be1ad14600dc7781e9 (patch)
treeb332a35f2a10a6f3391452d2e7d01609ca50b17a
parent94dcadd62ac66cc5c52579ae9c288314bbca0c20 (diff)
downloadgitlab-ce-104bfa2a3187aefebd4a53be1ad14600dc7781e9.tar.gz
Remove WikiPage#full_path
-rw-r--r--app/models/wiki_page.rb5
-rw-r--r--spec/models/wiki_page_spec.rb20
2 files changed, 0 insertions, 25 deletions
diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb
index 96d03d510ff..dec58681198 100644
--- a/app/models/wiki_page.rb
+++ b/app/models/wiki_page.rb
@@ -114,11 +114,6 @@ class WikiPage
@attributes[:format] || :markdown
end
- # The full path for this page, including its filename and extension.
- def full_path
- "#{directory}/#{page.filename}".gsub(/\/+/, '/')
- end
-
# The commit message for this page version.
def message
version.try(:message)
diff --git a/spec/models/wiki_page_spec.rb b/spec/models/wiki_page_spec.rb
index 11efd0415d9..482f98e22f1 100644
--- a/spec/models/wiki_page_spec.rb
+++ b/spec/models/wiki_page_spec.rb
@@ -270,26 +270,6 @@ describe WikiPage, models: true do
end
end
- describe '#full_path' do
- context 'when the page is at the root directory' do
- it 'returns /filename.fileextension' do
- create_page('file', 'content')
- page = wiki.find_page('file')
-
- expect(page.full_path).to eq('/file.md')
- end
- end
-
- context 'when the page is inside an actual directory' do
- it 'returns /directory/filename.fileextension' do
- create_page('dir/file', 'content')
- page = wiki.find_page('dir/file')
-
- expect(page.full_path).to eq('/dir/file.md')
- end
- end
- end
-
describe '#historical?' do
before do
create_page('Update', 'content')