2011-10-09 00:36:38 +03:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe "Projects" do
|
|
|
|
before { login_as :user }
|
|
|
|
|
2012-05-27 13:39:57 +03:00
|
|
|
describe "DELETE /projects/:id" do
|
|
|
|
before do
|
2013-01-02 19:32:34 +02:00
|
|
|
@project = create(:project, namespace: @user.namespace)
|
2013-01-04 08:43:25 +02:00
|
|
|
@project.team << [@user, :master]
|
2012-05-27 13:39:57 +03: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-09 00:36:38 +03:00
|
|
|
end
|