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
ac6b9faf
Commit
ac6b9faf
authored
Mar 14, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
b007cadf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
24 deletions
+21
-24
spec/observers/users_project_observer_spec.rb
spec/observers/users_project_observer_spec.rb
+0
-24
spec/services/projects_create_service_spec.rb
spec/services/projects_create_service_spec.rb
+21
-0
No files found.
spec/observers/users_project_observer_spec.rb
View file @
ac6b9faf
...
...
@@ -47,30 +47,6 @@ describe UsersProjectObserver do
end
describe
"#after_create"
do
context
'wiki_enabled creates repository directory'
do
context
'wiki_enabled true creates wiki repository directory'
do
before
do
@project
=
create
(
:project
,
wiki_enabled:
true
)
@path
=
GollumWiki
.
new
(
@project
,
user
).
send
(
:path_to_repo
)
end
after
do
FileUtils
.
rm_rf
(
@path
)
end
it
{
File
.
exists?
(
@path
).
should
be_true
}
end
context
'wiki_enabled false does not create wiki repository directory'
do
before
do
@project
=
create
(
:project
,
wiki_enabled:
false
)
@path
=
GollumWiki
.
new
(
@project
,
user
).
send
(
:path_to_repo
)
end
it
{
File
.
exists?
(
@path
).
should
be_false
}
end
end
it
"should send email to user"
do
subject
.
should_receive
(
:notification
)
Event
.
stub
(
create:
true
)
...
...
spec/services/projects_create_service_spec.rb
View file @
ac6b9faf
...
...
@@ -38,6 +38,27 @@ describe Projects::CreateService do
it
{
@project
.
namespace
.
should
==
@group
}
end
context
'wiki_enabled creates repository directory'
do
context
'wiki_enabled true creates wiki repository directory'
do
before
do
@project
=
create_project
(
@user
,
@opts
)
@path
=
GollumWiki
.
new
(
@project
,
@user
).
send
(
:path_to_repo
)
end
it
{
File
.
exists?
(
@path
).
should
be_true
}
end
context
'wiki_enabled false does not create wiki repository directory'
do
before
do
@opts
.
merge!
(
wiki_enabled:
false
)
@project
=
create_project
(
@user
,
@opts
)
@path
=
GollumWiki
.
new
(
@project
,
@user
).
send
(
:path_to_repo
)
end
it
{
File
.
exists?
(
@path
).
should
be_false
}
end
end
context
'respect configured visibility setting'
do
before
(
:each
)
do
@settings
=
double
(
"settings"
)
...
...
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