projects_spec.rb 537 Bytes
Newer Older
gitlabhq's avatar
gitlabhq committed
1 2
require 'spec_helper'

3
describe "Projects", feature: true  do
gitlabhq's avatar
gitlabhq committed
4 5
  before { login_as :user }

randx's avatar
randx committed
6 7
  describe "DELETE /projects/:id" do
    before do
8
      @project = create(:project, namespace: @user.namespace)
9
      @project.team << [@user, :master]
randx's avatar
randx committed
10 11 12
      visit edit_project_path(@project)
    end

13 14 15 16 17 18
    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)
randx's avatar
randx committed
19 20
    end
  end
gitlabhq's avatar
gitlabhq committed
21
end