diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 09:22:29 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-20 09:22:29 +0000 |
commit | 61d81025139e2e6b3706c05eee4e60ff13417323 (patch) | |
tree | 517dc8ebc4a9f8d74fd77eb7bd6d5466d5184d94 /spec/support | |
parent | 25fc1060affe576fd7c2f8aad586c5109c51cf7e (diff) | |
download | gitlab-ce-61d81025139e2e6b3706c05eee4e60ff13417323.tar.gz |
Add latest changes from gitlab-org/gitlab@14-0-stable-ee
Diffstat (limited to 'spec/support')
-rw-r--r-- | spec/support/shared_examples/models/concerns/has_repository_shared_examples.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/support/shared_examples/models/concerns/has_repository_shared_examples.rb b/spec/support/shared_examples/models/concerns/has_repository_shared_examples.rb index 1be4d9b80a4..a403a27adef 100644 --- a/spec/support/shared_examples/models/concerns/has_repository_shared_examples.rb +++ b/spec/support/shared_examples/models/concerns/has_repository_shared_examples.rb @@ -152,4 +152,20 @@ RSpec.shared_examples 'model with repository' do it { is_expected.to respond_to(:disk_path) } it { is_expected.to respond_to(:gitlab_shell) } end + + describe '#change_head' do + it 'delegates #change_head to repository' do + expect(stubbed_container.repository).to receive(:change_head).with('foo') + + stubbed_container.change_head('foo') + end + end + + describe '#after_repository_change_head' do + it 'calls #reload_default_branch' do + expect(stubbed_container).to receive(:reload_default_branch) + + stubbed_container.after_repository_change_head + end + end end |