2011-10-08 17:36:38 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2014-04-12 04:56:37 -04:00
|
|
|
describe "Projects", feature: true do
|
2011-10-08 17:36:38 -04:00
|
|
|
before { login_as :user }
|
|
|
|
|
2012-05-27 06:39:57 -04:00
|
|
|
describe "DELETE /projects/:id" do
|
|
|
|
before do
|
2013-01-02 12:32:34 -05:00
|
|
|
@project = create(:project, namespace: @user.namespace)
|
2013-01-04 01:43:25 -05:00
|
|
|
@project.team << [@user, :master]
|
2012-05-27 06:39:57 -04:00
|
|
|
visit edit_project_path(@project)
|
|
|
|
end
|
|
|
|
|
|
|
|
it "should be correct path" do
|
2013-03-19 00:46:07 -04:00
|
|
|
expect { click_link "Remove project" }.to change {Project.count}.by(-1)
|
2012-05-27 06:39:57 -04:00
|
|
|
end
|
|
|
|
end
|
2011-10-08 17:36:38 -04:00
|
|
|
end
|