summaryrefslogtreecommitdiff
path: root/spec/graphql/types/repository/blob_type_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-18 19:00:14 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-18 19:00:14 +0000
commit05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2 (patch)
tree11d0f2a6ec31c7793c184106cedc2ded3d9a2cc5 /spec/graphql/types/repository/blob_type_spec.rb
parentec73467c23693d0db63a797d10194da9e72a74af (diff)
downloadgitlab-ce-05f0ebba3a2c8ddf39e436f412dc2ab5bf1353b2.tar.gz
Add latest changes from gitlab-org/gitlab@15-8-stable-eev15.8.0-rc42
Diffstat (limited to 'spec/graphql/types/repository/blob_type_spec.rb')
-rw-r--r--spec/graphql/types/repository/blob_type_spec.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/graphql/types/repository/blob_type_spec.rb b/spec/graphql/types/repository/blob_type_spec.rb
index 787b5f4a311..9537fca7322 100644
--- a/spec/graphql/types/repository/blob_type_spec.rb
+++ b/spec/graphql/types/repository/blob_type_spec.rb
@@ -2,7 +2,9 @@
require 'spec_helper'
-RSpec.describe Types::Repository::BlobType do
+RSpec.describe Types::Repository::BlobType, feature_category: :source_code_management do
+ include GraphqlHelpers
+
specify { expect(described_class.graphql_name).to eq('RepositoryBlob') }
specify do
@@ -48,4 +50,13 @@ RSpec.describe Types::Repository::BlobType do
:language
).at_least
end
+
+ it 'handles blobs of huge size', :aggregate_failures do
+ huge_blob = Blob.new(double)
+ size = 10**10
+ allow(huge_blob).to receive_messages({ size: size, raw_size: size })
+
+ expect(resolve_field(:raw_size, huge_blob)).to eq(size)
+ expect(resolve_field(:size, huge_blob)).to eq(size)
+ end
end