Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7bd68ae0
Commit
7bd68ae0
authored
Dec 26, 2016
by
Alex Braha Stoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add WikiDirectory#to_partial_path
parent
84735186
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
app/models/wiki_directory.rb
app/models/wiki_directory.rb
+6
-0
spec/models/wiki_directory_spec.rb
spec/models/wiki_directory_spec.rb
+8
-0
No files found.
app/models/wiki_directory.rb
View file @
7bd68ae0
...
...
@@ -10,4 +10,10 @@ class WikiDirectory
@pages
=
pages
@directories
=
directories
end
# Relative path to the partial to be used when rendering collections
# of this object.
def
to_partial_path
'projects/wikis/wiki_directory'
end
end
spec/models/wiki_directory_spec.rb
View file @
7bd68ae0
...
...
@@ -42,4 +42,12 @@ RSpec.describe WikiDirectory, models: true do
end
end
end
describe
'#to_partial_path'
do
it
'returns the relative path to the partial to be used'
do
directory
=
build
(
:wiki_directory
)
expect
(
directory
.
to_partial_path
).
to
eq
(
'projects/wikis/wiki_directory'
)
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment