diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-31 15:08:09 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-31 15:08:09 +0300 |
commit | 0d0cddc9ce20c5a7d8a2723d0aa620ca184a711a (patch) | |
tree | 64f91b4d4ca74aa09d2a62ac5910820d087ed7cb /spec/lib/gitlab/git | |
parent | 6044caed20964a70c1ac6c5a3365d567ed96dfde (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/git')
-rw-r--r-- | spec/lib/gitlab/git/tree_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/lib/gitlab/git/tree_spec.rb b/spec/lib/gitlab/git/tree_spec.rb index d82acad866c..b254dd3f036 100644 --- a/spec/lib/gitlab/git/tree_spec.rb +++ b/spec/lib/gitlab/git/tree_spec.rb @@ -39,7 +39,10 @@ describe Gitlab::Git::Tree, :seed_helper do it { expect(dir.flat_path).to eq('encoding') } context :subdir do + # rubocop: disable Rails/FindBy + # This is not ActiveRecord where..first let(:subdir) { Gitlab::Git::Tree.where(repository, SeedRepo::Commit::ID, 'files').first } + # rubocop: enable Rails/FindBy it { expect(subdir).to be_kind_of Gitlab::Git::Tree } it { expect(subdir.id).to eq('a1e8f8d745cc87e3a9248358d9352bb7f9a0aeba') } @@ -50,7 +53,10 @@ describe Gitlab::Git::Tree, :seed_helper do end context :subdir_file do + # rubocop: disable Rails/FindBy + # This is not ActiveRecord where..first let(:subdir_file) { Gitlab::Git::Tree.where(repository, SeedRepo::Commit::ID, 'files/ruby').first } + # rubocop: enable Rails/FindBy it { expect(subdir_file).to be_kind_of Gitlab::Git::Tree } it { expect(subdir_file.id).to eq('7e3e39ebb9b2bf433b4ad17313770fbe4051649c') } @@ -63,7 +69,10 @@ describe Gitlab::Git::Tree, :seed_helper do context :flat_path do let(:filename) { 'files/flat/path/correct/content.txt' } let(:oid) { create_file(filename) } + # rubocop: disable Rails/FindBy + # This is not ActiveRecord where..first let(:subdir_file) { Gitlab::Git::Tree.where(repository, oid, 'files/flat').first } + # rubocop: enable Rails/FindBy let(:repository_rugged) { Rugged::Repository.new(File.join(SEED_STORAGE_PATH, TEST_REPO_PATH)) } it { expect(subdir_file.flat_path).to eq('files/flat/path/correct') } |