Commit 8ac990b4 authored by Jasper Maes's avatar Jasper Maes

Rails5: fix operations controller spec nil parameter

parent d57b6519
---
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