2011-10-08 17:36:38 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe "Projects" do
|
2013-04-10 16:28:42 -04:00
|
|
|
before(:each) { enable_observers }
|
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
|