Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-12 15:07:33 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-12 15:07:33 +0300
commit784fae4b9d7e92350075df2a43d06893080ed1e6 (patch)
treec7a6fd444acd6897622b233b250a34fd176f01da /spec/lib/gitlab/git
parentfc53ce8e6ca67bf217470179a1ea6cf139bcffad (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/git')
-rw-r--r--spec/lib/gitlab/git/commit_spec.rb4
-rw-r--r--spec/lib/gitlab/git/diff_spec.rb1
-rw-r--r--spec/lib/gitlab/git/hook_env_spec.rb1
-rw-r--r--spec/lib/gitlab/git/merge_base_spec.rb1
-rw-r--r--spec/lib/gitlab/git/remote_repository_spec.rb1
-rw-r--r--spec/lib/gitlab/git/repository_spec.rb1
-rw-r--r--spec/lib/gitlab/git/user_spec.rb2
7 files changed, 11 insertions, 0 deletions
diff --git a/spec/lib/gitlab/git/commit_spec.rb b/spec/lib/gitlab/git/commit_spec.rb
index 63f443e19d2..7ec655eb113 100644
--- a/spec/lib/gitlab/git/commit_spec.rb
+++ b/spec/lib/gitlab/git/commit_spec.rb
@@ -542,6 +542,7 @@ describe Gitlab::Git::Commit, :seed_helper do
skip 'move this test to gitaly-ruby' do
describe '#init_from_rugged' do
let(:gitlab_commit) { described_class.new(repository, rugged_commit) }
+
subject { gitlab_commit }
describe '#id' do
@@ -553,6 +554,7 @@ describe Gitlab::Git::Commit, :seed_helper do
describe '#init_from_hash' do
let(:commit) { described_class.new(repository, sample_commit_hash) }
+
subject { commit }
describe '#id' do
@@ -608,6 +610,7 @@ describe Gitlab::Git::Commit, :seed_helper do
describe '#to_hash' do
let(:hash) { commit.to_hash }
+
subject { hash }
it { is_expected.to be_kind_of Hash }
@@ -629,6 +632,7 @@ describe Gitlab::Git::Commit, :seed_helper do
describe '#ref_names' do
let(:commit) { described_class.find(repository, 'master') }
+
subject { commit.ref_names(repository) }
it 'has 2 element' do
diff --git a/spec/lib/gitlab/git/diff_spec.rb b/spec/lib/gitlab/git/diff_spec.rb
index 456d6af7bd8..ac606da5cc1 100644
--- a/spec/lib/gitlab/git/diff_spec.rb
+++ b/spec/lib/gitlab/git/diff_spec.rb
@@ -149,6 +149,7 @@ EOT
describe '.between' do
let(:diffs) { described_class.between(repository, 'feature', 'master') }
+
subject { diffs }
it { is_expected.to be_kind_of Gitlab::Git::DiffCollection }
diff --git a/spec/lib/gitlab/git/hook_env_spec.rb b/spec/lib/gitlab/git/hook_env_spec.rb
index ca6a4ad42a3..22b016cee3e 100644
--- a/spec/lib/gitlab/git/hook_env_spec.rb
+++ b/spec/lib/gitlab/git/hook_env_spec.rb
@@ -57,6 +57,7 @@ describe Gitlab::Git::HookEnv do
using RSpec::Parameterized::TableSyntax
let(:key) { 'GIT_OBJECT_DIRECTORY_RELATIVE' }
+
subject { described_class.to_env_hash(gl_repository) }
where(:input, :output) do
diff --git a/spec/lib/gitlab/git/merge_base_spec.rb b/spec/lib/gitlab/git/merge_base_spec.rb
index dbb4e3d0b3e..fa95a1664ea 100644
--- a/spec/lib/gitlab/git/merge_base_spec.rb
+++ b/spec/lib/gitlab/git/merge_base_spec.rb
@@ -5,6 +5,7 @@ require 'spec_helper'
describe Gitlab::Git::MergeBase do
set(:project) { create(:project, :repository) }
let(:repository) { project.repository }
+
subject(:merge_base) { described_class.new(repository, refs) }
shared_context 'existing refs with a merge base', :existing_refs do
diff --git a/spec/lib/gitlab/git/remote_repository_spec.rb b/spec/lib/gitlab/git/remote_repository_spec.rb
index 556cc692231..b53eee293f0 100644
--- a/spec/lib/gitlab/git/remote_repository_spec.rb
+++ b/spec/lib/gitlab/git/remote_repository_spec.rb
@@ -4,6 +4,7 @@ require 'spec_helper'
describe Gitlab::Git::RemoteRepository, :seed_helper do
let(:repository) { Gitlab::Git::Repository.new('default', TEST_REPO_PATH, '', 'group/project') }
+
subject { described_class.new(repository) }
describe '#empty?' do
diff --git a/spec/lib/gitlab/git/repository_spec.rb b/spec/lib/gitlab/git/repository_spec.rb
index 20a74af7a45..6854d514dcc 100644
--- a/spec/lib/gitlab/git/repository_spec.rb
+++ b/spec/lib/gitlab/git/repository_spec.rb
@@ -212,6 +212,7 @@ describe Gitlab::Git::Repository, :seed_helper do
describe '#ref_names' do
let(:ref_names) { repository.ref_names }
+
subject { ref_names }
it { is_expected.to be_kind_of Array }
diff --git a/spec/lib/gitlab/git/user_spec.rb b/spec/lib/gitlab/git/user_spec.rb
index 277b1c48355..6761413320a 100644
--- a/spec/lib/gitlab/git/user_spec.rb
+++ b/spec/lib/gitlab/git/user_spec.rb
@@ -26,6 +26,7 @@ describe Gitlab::Git::User do
describe '.from_gitlab' do
context 'when no commit_email has been set' do
let(:user) { build(:user, email: 'alice@example.com', commit_email: nil) }
+
subject { described_class.from_gitlab(user) }
it { expect(subject).to eq(described_class.new(user.username, user.name, user.email, 'user-')) }
@@ -33,6 +34,7 @@ describe Gitlab::Git::User do
context 'when commit_email has been set' do
let(:user) { build(:user, email: 'alice@example.com', commit_email: 'bob@example.com') }
+
subject { described_class.from_gitlab(user) }
it { expect(subject).to eq(described_class.new(user.username, user.name, user.commit_email, 'user-')) }