diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-19 12:10:08 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-07-19 12:10:08 +0000 |
commit | 1072f96e340ddad78e5dad6dfedc7c6e85fc53ea (patch) | |
tree | 573525bb3525f79cbb011f39ad11c11c6efea315 /spec/support/shared_examples/models/concerns/has_repository_shared_examples.rb | |
parent | 8cc0a0aa965798e74826197d350472d235af2f84 (diff) | |
download | gitlab-ce-1072f96e340ddad78e5dad6dfedc7c6e85fc53ea.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/shared_examples/models/concerns/has_repository_shared_examples.rb')
-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 |