diff options
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 |