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