diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /spec/requests/api/import_bitbucket_server_spec.rb | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'spec/requests/api/import_bitbucket_server_spec.rb')
-rw-r--r-- | spec/requests/api/import_bitbucket_server_spec.rb | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/requests/api/import_bitbucket_server_spec.rb b/spec/requests/api/import_bitbucket_server_spec.rb index 970416c7444..8ab41f49549 100644 --- a/spec/requests/api/import_bitbucket_server_spec.rb +++ b/spec/requests/api/import_bitbucket_server_spec.rb @@ -9,7 +9,15 @@ RSpec.describe API::ImportBitbucketServer do let(:secret) { "sekrettt" } let(:project_key) { 'TES' } let(:repo_slug) { 'vim' } - let(:repo) { { name: 'vim' } } + let(:repo) do + double('repo', + name: repo_slug, + browse_url: "#{base_uri}/projects/#{project_key}/repos/#{repo_slug}/browse", + clone_url: "#{base_uri}/scm/#{project_key}/#{repo_slug}.git", + description: 'provider', + visibility_level: Gitlab::VisibilityLevel::PUBLIC + ) + end describe "POST /import/bitbucket_server" do context 'with no optional parameters' do @@ -20,7 +28,7 @@ RSpec.describe API::ImportBitbucketServer do before do Grape::Endpoint.before_each do |endpoint| allow(endpoint).to receive(:client).and_return(client.as_null_object) - allow(client).to receive(:repo).with(project_key, repo_slug).and_return(double(name: repo_slug)) + allow(client).to receive(:repo).with(project_key, repo_slug).and_return(repo) end end |