2019-05-16 06:30:42 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-16 14:09:01 -04:00
|
|
|
RSpec.describe "Admin > Admin sees projects statistics" do
|
2019-05-16 06:30:42 -04:00
|
|
|
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
|