gitlab-org--gitlab-foss/spec/features/admin/admin_sees_projects_statistics_spec.rb
Rémy Coutable ec07641435
Fix an error in projects admin when statistics are missing
Signed-off-by: Rémy Coutable <remy@rymai.me>
2019-05-16 14:59:21 +02:00

20 lines
491 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
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)
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