debian-mirror-gitlab/spec/features/admin/admin_sees_projects_statistics_spec.rb

22 lines
549 B
Ruby
Raw Normal View History

2019-09-04 21:01:54 +05:30
# frozen_string_literal: true
require 'spec_helper'
2020-06-23 00:09:42 +05:30
RSpec.describe "Admin > Admin sees projects statistics" do
2019-09-04 21:01:54 +05:30
let(:current_user) { create(:admin) }
before do
create(:project, :repository)
2021-04-29 21:17:54 +05:30
create(:project, :repository) { |project| project.statistics.destroy! }
2019-09-04 21:01:54 +05:30
sign_in(current_user)
2021-02-22 17:27:13 +05:30
gitlab_enable_admin_mode_sign_in(current_user)
2019-09-04 21:01:54 +05:30
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