diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-07-07 18:21:34 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-07-07 18:21:34 +0000 |
commit | 787a23475a6de02438608d2af8d21577afbbd447 (patch) | |
tree | cea8893ddbad2f9dd57aa4530bc36c52bd5eb5fc /spec/lib | |
parent | b151951418bda31e3acdfe1dcb214b4d244f8566 (diff) | |
parent | 17d7d3de5d9f0515398586b77b122a069da30b65 (diff) | |
download | gitlab-ce-787a23475a6de02438608d2af8d21577afbbd447.tar.gz |
Merge branch 'gitaly-get-blob' into 'master'
Add gitaly_git_blob_raw feature
See merge request !12712
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/git/blob_spec.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/lib/gitlab/git/blob_spec.rb b/spec/lib/gitlab/git/blob_spec.rb index 58d3ee6b488..3c784eda4f8 100644 --- a/spec/lib/gitlab/git/blob_spec.rb +++ b/spec/lib/gitlab/git/blob_spec.rb @@ -111,7 +111,7 @@ describe Gitlab::Git::Blob, seed_helper: true do end end - describe '.raw' do + shared_examples 'finding blobs by ID' do let(:raw_blob) { Gitlab::Git::Blob.raw(repository, SeedRepo::RubyBlob::ID) } it { expect(raw_blob.id).to eq(SeedRepo::RubyBlob::ID) } it { expect(raw_blob.data[0..10]).to eq("require \'fi") } @@ -136,6 +136,16 @@ describe Gitlab::Git::Blob, seed_helper: true do end end + describe '.raw' do + context 'when the blob_raw Gitaly feature is enabled' do + it_behaves_like 'finding blobs by ID' + end + + context 'when the blob_raw Gitaly feature is disabled', skip_gitaly_mock: true do + it_behaves_like 'finding blobs by ID' + end + end + describe 'encoding' do context 'file with russian text' do let(:blob) { Gitlab::Git::Blob.find(repository, SeedRepo::Commit::ID, "encoding/russian.rb") } |