Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-06 21:08:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-06 21:08:54 +0300
commit0d6fa033121a9bef708b8f2de186c4034c61d4a3 (patch)
tree851d65a09efbffa114c9a273e590d55cfb1436ab /spec/controllers/boards/issues_controller_spec.rb
parent0eb3d2f799ce4f4de87fb9fc6fd98e592323bc89 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers/boards/issues_controller_spec.rb')
-rw-r--r--spec/controllers/boards/issues_controller_spec.rb36
1 files changed, 18 insertions, 18 deletions
diff --git a/spec/controllers/boards/issues_controller_spec.rb b/spec/controllers/boards/issues_controller_spec.rb
index d54f7ad33cf..605fff60c31 100644
--- a/spec/controllers/boards/issues_controller_spec.rb
+++ b/spec/controllers/boards/issues_controller_spec.rb
@@ -28,7 +28,7 @@ describe Boards::IssuesController do
it 'returns a not found 404 response' do
list_issues user: user, board: 999, list: list2
- expect(response).to have_gitlab_http_status(404)
+ expect(response).to have_gitlab_http_status(:not_found)
end
end
@@ -106,7 +106,7 @@ describe Boards::IssuesController do
it 'returns a not found 404 response' do
list_issues user: user, board: board, list: 999
- expect(response).to have_gitlab_http_status(404)
+ expect(response).to have_gitlab_http_status(:not_found)
end
end
end
@@ -132,7 +132,7 @@ describe Boards::IssuesController do
it 'returns a forbidden 403 response' do
list_issues user: unauth_user, board: board, list: list2
- expect(response).to have_gitlab_http_status(403)
+ expect(response).to have_gitlab_http_status(:forbidden)
end
end
@@ -148,7 +148,7 @@ describe Boards::IssuesController do
list_issues(user: user, board: group_board)
- expect(response).to have_gitlab_http_status(403)
+ expect(response).to have_gitlab_http_status(:forbidden)
end
it 'is successful for project boards' do
@@ -156,7 +156,7 @@ describe Boards::IssuesController do
list_issues(user: user, board: project_board)
- expect(response).to have_gitlab_http_status(200)
+ expect(response).to have_gitlab_http_status(:ok)
end
end
@@ -215,7 +215,7 @@ describe Boards::IssuesController do
expect(response).to have_gitlab_http_status(expected_status)
list_issues user: requesting_user, board: board, list: list2
- expect(response).to have_gitlab_http_status(200)
+ expect(response).to have_gitlab_http_status(:ok)
expect(response).to match_response_schema('entities/issue_boards')
@@ -391,7 +391,7 @@ describe Boards::IssuesController do
it 'returns a successful 200 response' do
create_issue user: user, board: board, list: list1, title: 'New issue'
- expect(response).to have_gitlab_http_status(200)
+ expect(response).to have_gitlab_http_status(:ok)
end
it 'returns the created issue' do
@@ -406,7 +406,7 @@ describe Boards::IssuesController do
it 'returns an unprocessable entity 422 response' do
create_issue user: user, board: board, list: list1, title: nil
- expect(response).to have_gitlab_http_status(422)
+ expect(response).to have_gitlab_http_status(:unprocessable_entity)
end
end
@@ -416,7 +416,7 @@ describe Boards::IssuesController do
create_issue user: user, board: board, list: list, title: 'New issue'
- expect(response).to have_gitlab_http_status(404)
+ expect(response).to have_gitlab_http_status(:not_found)
end
end
@@ -424,7 +424,7 @@ describe Boards::IssuesController do
it 'returns a not found 404 response' do
create_issue user: user, board: 999, list: list1, title: 'New issue'
- expect(response).to have_gitlab_http_status(404)
+ expect(response).to have_gitlab_http_status(:not_found)
end
end
@@ -432,7 +432,7 @@ describe Boards::IssuesController do
it 'returns a not found 404 response' do
create_issue user: user, board: board, list: 999, title: 'New issue'
- expect(response).to have_gitlab_http_status(404)
+ expect(response).to have_gitlab_http_status(:not_found)
end
end
end
@@ -443,7 +443,7 @@ describe Boards::IssuesController do
open_list = board.lists.create(list_type: :backlog)
create_issue user: guest, board: board, list: open_list, title: 'New issue'
- expect(response).to have_gitlab_http_status(200)
+ expect(response).to have_gitlab_http_status(:ok)
end
end
@@ -451,7 +451,7 @@ describe Boards::IssuesController do
it 'returns a forbidden 403 response' do
create_issue user: guest, board: board, list: list1, title: 'New issue'
- expect(response).to have_gitlab_http_status(403)
+ expect(response).to have_gitlab_http_status(:forbidden)
end
end
end
@@ -475,7 +475,7 @@ describe Boards::IssuesController do
it 'returns a successful 200 response' do
move user: user, board: board, issue: issue, from_list_id: list1.id, to_list_id: list2.id
- expect(response).to have_gitlab_http_status(200)
+ expect(response).to have_gitlab_http_status(:ok)
end
it 'moves issue to the desired list' do
@@ -489,19 +489,19 @@ describe Boards::IssuesController do
it 'returns a unprocessable entity 422 response for invalid lists' do
move user: user, board: board, issue: issue, from_list_id: nil, to_list_id: nil
- expect(response).to have_gitlab_http_status(422)
+ expect(response).to have_gitlab_http_status(:unprocessable_entity)
end
it 'returns a not found 404 response for invalid board id' do
move user: user, board: 999, issue: issue, from_list_id: list1.id, to_list_id: list2.id
- expect(response).to have_gitlab_http_status(404)
+ expect(response).to have_gitlab_http_status(:not_found)
end
it 'returns a not found 404 response for invalid issue id' do
move user: user, board: board, issue: double(id: 999), from_list_id: list1.id, to_list_id: list2.id
- expect(response).to have_gitlab_http_status(404)
+ expect(response).to have_gitlab_http_status(:not_found)
end
end
@@ -515,7 +515,7 @@ describe Boards::IssuesController do
it 'returns a forbidden 403 response' do
move user: guest, board: board, issue: issue, from_list_id: list1.id, to_list_id: list2.id
- expect(response).to have_gitlab_http_status(403)
+ expect(response).to have_gitlab_http_status(:forbidden)
end
end