Commit 3c43fcd0 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'rails5-fix-ops-controller-spec' into 'master'

Rails5: fix operations controller spec nil parameter

See merge request gitlab-org/gitlab-ee!8209
parents e2c7f661 8ac990b4
---
title: 'Rails5: fix operations controller spec nil parameter'
merge_request: 8209
author: Jasper Maes
type: other
......@@ -181,13 +181,13 @@ describe OperationsController do
end
it 'does not add invalid project ids' do
post :create, project_ids: [nil, -1, '-2']
post :create, project_ids: ['', -1, '-2']
expect(response).to have_gitlab_http_status(200)
expect(json_response).to match_schema('dashboard/operations/add', dir: 'ee')
expect(json_response['added']).to be_empty
expect(json_response['duplicate']).to be_empty
expect(json_response['invalid']).to contain_exactly(nil, '-1', '-2')
expect(json_response['invalid']).to contain_exactly('', '-1', '-2')
user.reload
expect(user.ops_dashboard_projects).to be_empty
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment