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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
0cd28156
Commit
0cd28156
authored
Oct 10, 2013
by
Izaak Alpert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated missed styles
Change-Id: I05e02ff7e36e2350cdf5d2b94095ada9760a204e
parent
3e71af9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
app/observers/project_observer.rb
app/observers/project_observer.rb
+1
-1
spec/observers/users_project_observer_spec.rb
spec/observers/users_project_observer_spec.rb
+5
-2
No files found.
app/observers/project_observer.rb
View file @
0cd28156
...
@@ -16,7 +16,7 @@ class ProjectObserver < BaseObserver
...
@@ -16,7 +16,7 @@ class ProjectObserver < BaseObserver
end
end
if
project
.
wiki_enabled?
if
project
.
wiki_enabled?
#force the creation of a wiki,
#
force the creation of a wiki,
GollumWiki
.
new
(
project
,
project
.
owner
).
wiki
GollumWiki
.
new
(
project
,
project
.
owner
).
wiki
end
end
end
end
...
...
spec/observers/users_project_observer_spec.rb
View file @
0cd28156
...
@@ -70,20 +70,23 @@ describe UsersProjectObserver do
...
@@ -70,20 +70,23 @@ describe UsersProjectObserver do
context
'wiki_enabled creates repository directory'
do
context
'wiki_enabled creates repository directory'
do
context
'wiki_enabled true creates wiki repository directory'
do
context
'wiki_enabled true creates wiki repository directory'
do
before
do
before
do
@project
=
create
(
:project
,
wiki_enabled
:true
)
@project
=
create
(
:project
,
wiki_enabled:
true
)
@path
=
GollumWiki
.
new
(
@project
,
user
).
send
(
:path_to_repo
)
@path
=
GollumWiki
.
new
(
@project
,
user
).
send
(
:path_to_repo
)
end
end
after
do
after
do
FileUtils
.
rm_rf
(
@path
)
FileUtils
.
rm_rf
(
@path
)
end
end
it
{
File
.
exists?
(
@path
).
should
be_true
}
it
{
File
.
exists?
(
@path
).
should
be_true
}
end
end
context
'wiki_enabled false does not create wiki repository directory'
do
context
'wiki_enabled false does not create wiki repository directory'
do
before
do
before
do
@project
=
create
(
:project
,
wiki_enabled
:false
)
@project
=
create
(
:project
,
wiki_enabled:
false
)
@path
=
GollumWiki
.
new
(
@project
,
user
).
send
(
:path_to_repo
)
@path
=
GollumWiki
.
new
(
@project
,
user
).
send
(
:path_to_repo
)
end
end
it
{
File
.
exists?
(
@path
).
should
be_false
}
it
{
File
.
exists?
(
@path
).
should
be_false
}
end
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