diff options
author | Stan Hu <stanhu@gmail.com> | 2019-03-22 21:40:50 +0300 |
---|---|---|
committer | GitLab Release Tools Bot <robert+release-tools@gitlab.com> | 2019-03-25 13:54:07 +0300 |
commit | 5c4905b6181dc8e256b4241a2477c423181784bd (patch) | |
tree | c99b4fbac624c3f7f481650e485644560f01840c /spec/lib/gitlab/github_import/importer/repository_importer_spec.rb | |
parent | 63440d06647d6e2e6fb0fa9074cabf0a96cc66d3 (diff) |
Merge branch 'retain-default-branch-on-import' into 'master'
Set proper default-branch on GitHub Import
Closes #59347
See merge request gitlab-org/gitlab-ce!26476
(cherry picked from commit 3eba3a187c6fab19937ff072f848e5a4d47ab2b2)
31fb85d5 Set proper default-branch on GitHub Import
Diffstat (limited to 'spec/lib/gitlab/github_import/importer/repository_importer_spec.rb')
-rw-r--r-- | spec/lib/gitlab/github_import/importer/repository_importer_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/lib/gitlab/github_import/importer/repository_importer_spec.rb b/spec/lib/gitlab/github_import/importer/repository_importer_spec.rb index 47233ea6ee2..41810a8ec03 100644 --- a/spec/lib/gitlab/github_import/importer/repository_importer_spec.rb +++ b/spec/lib/gitlab/github_import/importer/repository_importer_spec.rb @@ -179,6 +179,17 @@ describe Gitlab::GithubImport::Importer::RepositoryImporter do describe '#import_repository' do it 'imports the repository' do + repo = double(:repo, default_branch: 'develop') + + expect(client) + .to receive(:repository) + .with('foo/bar') + .and_return(repo) + + expect(project) + .to receive(:change_head) + .with('develop') + expect(project) .to receive(:ensure_repository) |