summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-07-01 09:30:43 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-07-01 09:30:43 +0000
commit2d85458ac7e5c054b93cf5f3bf228dfcf12fe0a9 (patch)
treef69594cffa3bca318878cdc6ace0bf2fec5795aa /spec
parentb096374dd50226b96f96203f3a02780c40c4502a (diff)
parentbaf12f45d8705693755a8343e53525e92dc26ca6 (diff)
downloadgitlab-ce-2d85458ac7e5c054b93cf5f3bf228dfcf12fe0a9.tar.gz
Merge branch 'fix-zero-sha-lookup' into 'master'
Repository#blob_at should return nil for 00000000... sha Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> See merge request !916
Diffstat (limited to 'spec')
-rw-r--r--spec/models/repository_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb
index f41e5a97ca3..77ceb6c8adc 100644
--- a/spec/models/repository_spec.rb
+++ b/spec/models/repository_spec.rb
@@ -25,4 +25,12 @@ describe Repository do
it { is_expected.to eq('c1acaa58bbcbc3eafe538cb8274ba387047b69f8') }
end
+
+ describe :blob_at do
+ context 'blank sha' do
+ subject { repository.blob_at(Gitlab::Git::BLANK_SHA, '.gitignore') }
+
+ it { is_expected.to be_nil }
+ end
+ end
end