BigW Consortium Gitlab

admin_projects_spec.rb 741 Bytes
Newer Older
gitlabhq committed
1 2
require 'spec_helper'

3
describe "Admin::Projects", feature: true  do
Nihad Abbasov committed
4
  before do
5
    @project = create(:project)
gitlabhq committed
6 7 8 9
    login_as :admin
  end

  describe "GET /admin/projects" do
Nihad Abbasov committed
10
    before do
Vinnie Okada committed
11
      visit admin_namespaces_projects_path
gitlabhq committed
12 13 14
    end

    it "should be ok" do
Vinnie Okada committed
15
      expect(current_path).to eq(admin_namespaces_projects_path)
gitlabhq committed
16 17
    end

Nihad Abbasov committed
18
    it "should have projects list" do
19
      expect(page).to have_content(@project.name)
gitlabhq committed
20 21 22
    end
  end

Nihad Abbasov committed
23 24
  describe "GET /admin/projects/:id" do
    before do
Vinnie Okada committed
25
      visit admin_namespaces_projects_path
Saito committed
26
      click_link "#{@project.name}"
gitlabhq committed
27 28
    end

Nihad Abbasov committed
29
    it "should have project info" do
30 31
      expect(page).to have_content(@project.path)
      expect(page).to have_content(@project.name)
gitlabhq committed
32 33 34
    end
  end
end