diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-06 18:08:54 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-06 18:08:54 +0000 |
commit | 0d6fa033121a9bef708b8f2de186c4034c61d4a3 (patch) | |
tree | 851d65a09efbffa114c9a273e590d55cfb1436ab /spec/controllers/dashboard/todos_controller_spec.rb | |
parent | 0eb3d2f799ce4f4de87fb9fc6fd98e592323bc89 (diff) | |
download | gitlab-ce-0d6fa033121a9bef708b8f2de186c4034c61d4a3.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers/dashboard/todos_controller_spec.rb')
-rw-r--r-- | spec/controllers/dashboard/todos_controller_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/controllers/dashboard/todos_controller_spec.rb b/spec/controllers/dashboard/todos_controller_spec.rb index 4ce445fe41a..0823afe410d 100644 --- a/spec/controllers/dashboard/todos_controller_spec.rb +++ b/spec/controllers/dashboard/todos_controller_spec.rb @@ -20,19 +20,19 @@ describe Dashboard::TodosController do get :index, params: { project_id: unauthorized_project.id } - expect(response).to have_gitlab_http_status(404) + expect(response).to have_gitlab_http_status(:not_found) end it 'renders 404 when given project does not exists' do get :index, params: { project_id: 999 } - expect(response).to have_gitlab_http_status(404) + expect(response).to have_gitlab_http_status(:not_found) end it 'renders 200 when filtering for "any project" todos' do get :index, params: { project_id: '' } - expect(response).to have_gitlab_http_status(200) + expect(response).to have_gitlab_http_status(:ok) end it 'renders 200 when user has access on given project' do @@ -40,7 +40,7 @@ describe Dashboard::TodosController do get :index, params: { project_id: authorized_project.id } - expect(response).to have_gitlab_http_status(200) + expect(response).to have_gitlab_http_status(:ok) end end @@ -78,7 +78,7 @@ describe Dashboard::TodosController do get :index, params: { group_id: unauthorized_group.id } - expect(response).to have_gitlab_http_status(404) + expect(response).to have_gitlab_http_status(:not_found) end end @@ -130,7 +130,7 @@ describe Dashboard::TodosController do patch :restore, params: { id: todo.id } expect(todo.reload).to be_pending - expect(response).to have_gitlab_http_status(200) + expect(response).to have_gitlab_http_status(:ok) expect(json_response).to eq({ "count" => 1, "done_count" => 0 }) end end @@ -144,7 +144,7 @@ describe Dashboard::TodosController do todos.each do |todo| expect(todo.reload).to be_pending end - expect(response).to have_gitlab_http_status(200) + expect(response).to have_gitlab_http_status(:ok) expect(json_response).to eq({ 'count' => 2, 'done_count' => 0 }) end end |