Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-10-28 21:02:01 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-10-28 21:02:01 +0300
commitfa39863611a3eab3f386ccd0e8e5003cbd9a7ddb (patch)
treed1cf059f2e72b8bbc54b1ce1b681141233d9b947 /spec/features/projects_spec.rb
parentc71792d98c3bcf6b15f28f27b89359b0be081914 (diff)
Fix tests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'spec/features/projects_spec.rb')
-rw-r--r--spec/features/projects_spec.rb20
1 files changed, 11 insertions, 9 deletions
diff --git a/spec/features/projects_spec.rb b/spec/features/projects_spec.rb
index 87bfe102d39..d291621935b 100644
--- a/spec/features/projects_spec.rb
+++ b/spec/features/projects_spec.rb
@@ -1,6 +1,6 @@
require 'spec_helper'
-describe "Projects", feature: true do
+describe "Projects", feature: true, js: true do
before { login_as :user }
describe "DELETE /projects/:id" do
@@ -10,21 +10,23 @@ describe "Projects", feature: true do
visit edit_project_path(@project)
end
- it "should be correct path", js: true do
- expect {
- click_link "Remove project"
- fill_in 'confirm_name_input', with: @project.path
- click_button 'Confirm'
- }.to change {Project.count}.by(-1)
+ it "should remove project" do
+ expect { remove_project }.to change {Project.count}.by(-1)
end
- it 'should delete the project from the database and disk' do
+ it 'should delete the project from disk' do
expect(GitlabShellWorker).to(
receive(:perform_async).with(:remove_repository,
/#{@project.path_with_namespace}/)
).twice
- expect { click_link "Remove project" }.to change {Project.count}.by(-1)
+ remove_project
end
end
+
+ def remove_project
+ click_link "Remove project"
+ fill_in 'confirm_name_input', with: @project.path
+ click_button 'Confirm'
+ end
end