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
Boxiang Sun
gitlab-ce
Commits
fa398636
Commit
fa398636
authored
Oct 28, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
c71792d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
spec/features/projects_spec.rb
spec/features/projects_spec.rb
+11
-9
No files found.
spec/features/projects_spec.rb
View file @
fa398636
require
'spec_helper'
require
'spec_helper'
describe
"Projects"
,
feature:
true
do
describe
"Projects"
,
feature:
true
,
js:
true
do
before
{
login_as
:user
}
before
{
login_as
:user
}
describe
"DELETE /projects/:id"
do
describe
"DELETE /projects/:id"
do
...
@@ -10,21 +10,23 @@ describe "Projects", feature: true do
...
@@ -10,21 +10,23 @@ describe "Projects", feature: true do
visit
edit_project_path
(
@project
)
visit
edit_project_path
(
@project
)
end
end
it
"should be correct path"
,
js:
true
do
it
"should remove project"
do
expect
{
expect
{
remove_project
}.
to
change
{
Project
.
count
}.
by
(
-
1
)
click_link
"Remove project"
fill_in
'confirm_name_input'
,
with:
@project
.
path
click_button
'Confirm'
}.
to
change
{
Project
.
count
}.
by
(
-
1
)
end
end
it
'should delete the project from
the database and
disk'
do
it
'should delete the project from disk'
do
expect
(
GitlabShellWorker
).
to
(
expect
(
GitlabShellWorker
).
to
(
receive
(
:perform_async
).
with
(
:remove_repository
,
receive
(
:perform_async
).
with
(
:remove_repository
,
/
#{
@project
.
path_with_namespace
}
/
)
/
#{
@project
.
path_with_namespace
}
/
)
).
twice
).
twice
expect
{
click_link
"Remove project"
}.
to
change
{
Project
.
count
}.
by
(
-
1
)
remove_project
end
end
end
end
def
remove_project
click_link
"Remove project"
fill_in
'confirm_name_input'
,
with:
@project
.
path
click_button
'Confirm'
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