summaryrefslogtreecommitdiff
path: root/spec/support/shared_examples/models/concerns/has_repository_shared_examples.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-19 12:10:08 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-19 12:10:08 +0000
commit1072f96e340ddad78e5dad6dfedc7c6e85fc53ea (patch)
tree573525bb3525f79cbb011f39ad11c11c6efea315 /spec/support/shared_examples/models/concerns/has_repository_shared_examples.rb
parent8cc0a0aa965798e74826197d350472d235af2f84 (diff)
downloadgitlab-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.rb16
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