Welcome to mirror list, hosted at ThFree Co, Russian Federation.

admin_sees_projects_statistics_spec.rb « admin « features « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 2e96814d1e9dd1dc0be5fa49b386d092214463c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe "Admin > Admin sees projects statistics" do
  let(:current_user) { create(:admin) }

  before do
    create(:project, :repository)
    create(:project, :repository) { |project| project.statistics.destroy }

    sign_in(current_user)
    gitlab_enable_admin_mode_sign_in(current_user)

    visit admin_projects_path
  end

  it "shows project statistics for projects that have them" do
    expect(page.all('.stats').map(&:text)).to contain_exactly("0 Bytes", "Unknown")
  end
end