summaryrefslogtreecommitdiff
path: root/spec/lib/gitlab/gitaly_client/operation_service_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/gitaly_client/operation_service_spec.rb')
-rw-r--r--spec/lib/gitlab/gitaly_client/operation_service_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/gitlab/gitaly_client/operation_service_spec.rb b/spec/lib/gitlab/gitaly_client/operation_service_spec.rb
index 4e16f760235..b974f456914 100644
--- a/spec/lib/gitlab/gitaly_client/operation_service_spec.rb
+++ b/spec/lib/gitlab/gitaly_client/operation_service_spec.rb
@@ -20,11 +20,13 @@ RSpec.describe Gitlab::GitalyClient::OperationService do
user: gitaly_user
)
end
+
let(:gitaly_commit) { build(:gitaly_commit) }
let(:commit_id) { gitaly_commit.id }
let(:gitaly_branch) do
Gitaly::Branch.new(name: branch_name, target_commit: gitaly_commit)
end
+
let(:response) { Gitaly::UserCreateBranchResponse.new(branch: gitaly_branch) }
let(:commit) { Gitlab::Git::Commit.new(repository, gitaly_commit) }
@@ -68,6 +70,7 @@ RSpec.describe Gitlab::GitalyClient::OperationService do
user: gitaly_user
)
end
+
let(:response) { Gitaly::UserUpdateBranchResponse.new }
subject { client.user_update_branch(branch_name, user, newrev, oldrev) }
@@ -123,6 +126,7 @@ RSpec.describe Gitlab::GitalyClient::OperationService do
user: gitaly_user
)
end
+
let(:response) { Gitaly::UserDeleteBranchResponse.new }
subject { client.user_delete_branch(branch_name, user) }
@@ -162,6 +166,7 @@ RSpec.describe Gitlab::GitalyClient::OperationService do
user: gitaly_user
)
end
+
let(:branch_update) do
Gitaly::OperationBranchUpdate.new(
commit_id: source_sha,
@@ -169,6 +174,7 @@ RSpec.describe Gitlab::GitalyClient::OperationService do
branch_created: false
)
end
+
let(:response) { Gitaly::UserFFBranchResponse.new(branch_update: branch_update) }
before do
@@ -303,6 +309,7 @@ RSpec.describe Gitlab::GitalyClient::OperationService do
commit_message: commit_message
)
end
+
let(:squash_sha) { 'f00' }
let(:response) { Gitaly::UserSquashResponse.new(squash_sha: squash_sha) }
@@ -375,6 +382,7 @@ RSpec.describe Gitlab::GitalyClient::OperationService do
let(:patch_content) do
patch_names.map { |name| File.read(File.join(patches_folder, name)) }.join("\n")
end
+
let(:patch_names) { %w(0001-This-does-not-apply-to-the-feature-branch.patch) }
let(:branch_name) { 'branch-with-patches' }