diff options
Diffstat (limited to 'spec/workers/repository_fork_worker_spec.rb')
-rw-r--r-- | spec/workers/repository_fork_worker_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/workers/repository_fork_worker_spec.rb b/spec/workers/repository_fork_worker_spec.rb index 31598586f59..4912baa348c 100644 --- a/spec/workers/repository_fork_worker_spec.rb +++ b/spec/workers/repository_fork_worker_spec.rb @@ -47,6 +47,14 @@ describe RepositoryForkWorker do perform! end + it 'protects the default branch' do + expect_fork_repository.and_return(true) + + perform! + + expect(fork_project.protected_branches.first.name).to eq(fork_project.default_branch) + end + it 'flushes various caches' do expect_fork_repository.and_return(true) |