Skip to content
Snippets Groups Projects
Commit 104bfa2a authored by Alex Braha Stoll's avatar Alex Braha Stoll
Browse files

Remove WikiPage#full_path

parent 94dcadd6
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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)
Loading
Loading
Loading
Loading
@@ -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')
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment