Commit 27550e2f authored by Matthias van de Meent's avatar Matthias van de Meent

Update tests to test for 5 GB of packages in the project/namespace statistics.

This would currently fail due to graphql-constraints on integer types (which is of range -2^31 .. 2^31-1)
parent f13d34c7
......@@ -6,7 +6,7 @@ describe 'rendering namespace statistics' do
include GraphqlHelpers
let(:namespace) { user.namespace }
let!(:statistics) { create(:namespace_root_storage_statistics, namespace: namespace, packages_size: 5.megabytes) }
let!(:statistics) { create(:namespace_root_storage_statistics, namespace: namespace, packages_size: 5.gigabytes) }
let(:user) { create(:user) }
let(:query) do
......@@ -26,7 +26,7 @@ describe 'rendering namespace statistics' do
post_graphql(query, current_user: user)
expect(graphql_data['namespace']['rootStorageStatistics']).not_to be_blank
expect(graphql_data['namespace']['rootStorageStatistics']['packagesSize']).to eq(5.megabytes)
expect(graphql_data['namespace']['rootStorageStatistics']['packagesSize']).to eq(5.gigabytes)
end
end
......
......@@ -6,7 +6,7 @@ describe 'rendering project statistics' do
include GraphqlHelpers
let(:project) { create(:project) }
let!(:project_statistics) { create(:project_statistics, project: project, packages_size: 5.megabytes) }
let!(:project_statistics) { create(:project_statistics, project: project, packages_size: 5.gigabytes) }
let(:user) { create(:user) }
let(:query) do
......@@ -28,7 +28,7 @@ describe 'rendering project statistics' do
it "includes the packages size if the user can read the statistics" do
post_graphql(query, current_user: user)
expect(graphql_data['project']['statistics']['packagesSize']).to eq(5.megabytes)
expect(graphql_data['project']['statistics']['packagesSize']).to eq(5.gigabytes)
end
context 'when the project is public' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment