Merge branch 'fix-logic-in-43263-git-push-option-to-create-mr-test' into 'master'

Fix logic in Api::Internal test

See merge request gitlab-org/gitlab-ce!27193
This commit is contained in:
Lin Jen-Shin 2019-04-17 07:21:37 +00:00
commit e574bda61e
1 changed files with 2 additions and 4 deletions

View File

@ -998,15 +998,13 @@ describe API::Internal do
context 'when the feature is disabled' do context 'when the feature is disabled' do
it 'does not invoke MergeRequests::PushOptionsHandlerService' do it 'does not invoke MergeRequests::PushOptionsHandlerService' do
Feature.disable(:mr_push_options) stub_feature_flags(mr_push_options: false)
expect(MergeRequests::PushOptionsHandlerService).to receive(:new) expect(MergeRequests::PushOptionsHandlerService).not_to receive(:new)
expect do expect do
post api('/internal/post_receive'), params: valid_params post api('/internal/post_receive'), params: valid_params
end.not_to change { MergeRequest.count } end.not_to change { MergeRequest.count }
Feature.enable(:mr_push_options)
end end
end end
end end