diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-08-31 20:16:34 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-10-19 12:57:20 +0300 |
commit | f3fba178b931cd2ba67f81ee667893cb84e7d42f (patch) | |
tree | 24c5a688880d5edd75642a7f16623124bde9fc22 /spec/workers/rebase_worker_spec.rb | |
parent | 4321d70d24a6a7dc99f80fa4211ba6250504d99b (diff) |
Remove the `ForkedProjectLink` model
This removes the `ForkedProjectLink` model that has been replaced by
the `ForkNetworkMember` and `ForkNetwork` combination. All existing
relations have been adjusted to use these new models.
The `forked_project_link` table has been dropped.
The "Forks" count on the admin dashboard has been updated to count all
`ForkNetworkMember` rows and deduct the number of `ForkNetwork`
rows. This is because now the "root-project" of a fork network also
has a `ForkNetworkMember` row. This count could become inaccurate when
the root of a fork network is deleted.
Diffstat (limited to 'spec/workers/rebase_worker_spec.rb')
-rw-r--r-- | spec/workers/rebase_worker_spec.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/spec/workers/rebase_worker_spec.rb b/spec/workers/rebase_worker_spec.rb index 20aff020dbb..936b9deaecc 100644 --- a/spec/workers/rebase_worker_spec.rb +++ b/spec/workers/rebase_worker_spec.rb @@ -1,25 +1,23 @@ require 'spec_helper' describe RebaseWorker, '#perform' do + include ProjectForksHelper + context 'when rebasing an MR from a fork where upstream has protected branches' do let(:upstream_project) { create(:project, :repository) } - let(:fork_project) { create(:project, :repository) } + let(:forked_project) { fork_project(upstream_project, nil, repository: true) } let(:merge_request) do create(:merge_request, - source_project: fork_project, + source_project: forked_project, source_branch: 'feature_conflict', target_project: upstream_project, target_branch: 'master') end - before do - create(:forked_project_link, forked_to_project: fork_project, forked_from_project: upstream_project) - end - it 'sets the correct project for running hooks' do expect(MergeRequests::RebaseService) - .to receive(:new).with(fork_project, merge_request.author).and_call_original + .to receive(:new).with(forked_project, merge_request.author).and_call_original subject.perform(merge_request, merge_request.author) end |