diff options
Diffstat (limited to 'spec/controllers/projects/merge_requests/conflicts_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects/merge_requests/conflicts_controller_spec.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/spec/controllers/projects/merge_requests/conflicts_controller_spec.rb b/spec/controllers/projects/merge_requests/conflicts_controller_spec.rb index 393d38c6e6b..2d7647a6e12 100644 --- a/spec/controllers/projects/merge_requests/conflicts_controller_spec.rb +++ b/spec/controllers/projects/merge_requests/conflicts_controller_spec.rb @@ -17,8 +17,8 @@ describe Projects::MergeRequests::ConflictsController do describe 'GET show' do context 'when the conflicts cannot be resolved in the UI' do before do - allow_any_instance_of(Gitlab::Conflict::Parser) - .to receive(:parse).and_raise(Gitlab::Conflict::Parser::UnmergeableFile) + allow(Gitlab::Git::Conflict::Parser).to receive(:parse) + .and_raise(Gitlab::Git::Conflict::Parser::UnmergeableFile) get :show, namespace_id: merge_request_with_conflicts.project.namespace.to_param, @@ -28,7 +28,7 @@ describe Projects::MergeRequests::ConflictsController do end it 'returns a 200 status code' do - expect(response).to have_http_status(:ok) + expect(response).to have_gitlab_http_status(:ok) end it 'returns JSON with a message' do @@ -109,14 +109,14 @@ describe Projects::MergeRequests::ConflictsController do context 'when the conflicts cannot be resolved in the UI' do before do - allow_any_instance_of(Gitlab::Conflict::Parser) - .to receive(:parse).and_raise(Gitlab::Conflict::Parser::UnmergeableFile) + allow(Gitlab::Git::Conflict::Parser).to receive(:parse) + .and_raise(Gitlab::Git::Conflict::Parser::UnmergeableFile) conflict_for_path('files/ruby/regex.rb') end it 'returns a 404 status code' do - expect(response).to have_http_status(:not_found) + expect(response).to have_gitlab_http_status(:not_found) end end @@ -126,7 +126,7 @@ describe Projects::MergeRequests::ConflictsController do end it 'returns a 404 status code' do - expect(response).to have_http_status(:not_found) + expect(response).to have_gitlab_http_status(:not_found) end end @@ -138,7 +138,7 @@ describe Projects::MergeRequests::ConflictsController do end it 'returns a 200 status code' do - expect(response).to have_http_status(:ok) + expect(response).to have_gitlab_http_status(:ok) end it 'returns the file in JSON format' do @@ -198,7 +198,7 @@ describe Projects::MergeRequests::ConflictsController do end it 'returns an OK response' do - expect(response).to have_http_status(:ok) + expect(response).to have_gitlab_http_status(:ok) end end @@ -224,7 +224,7 @@ describe Projects::MergeRequests::ConflictsController do end it 'returns a 400 error' do - expect(response).to have_http_status(:bad_request) + expect(response).to have_gitlab_http_status(:bad_request) end it 'has a message with the name of the first missing section' do @@ -254,7 +254,7 @@ describe Projects::MergeRequests::ConflictsController do end it 'returns a 400 error' do - expect(response).to have_http_status(:bad_request) + expect(response).to have_gitlab_http_status(:bad_request) end it 'has a message with the name of the missing file' do @@ -292,7 +292,7 @@ describe Projects::MergeRequests::ConflictsController do end it 'returns a 400 error' do - expect(response).to have_http_status(:bad_request) + expect(response).to have_gitlab_http_status(:bad_request) end it 'has a message with the path of the problem file' do |