summaryrefslogtreecommitdiff
path: root/spec/controllers/boards/issues_controller_spec.rb
diff options
context:
space:
mode:
authorPatrick Derichs <pderichs@gitlab.com>2019-07-16 16:17:37 +0200
committerPatrick Derichs <pderichs@gitlab.com>2019-07-16 16:18:16 +0200
commitca089d91f6313b32a6381aef36583e83869f4017 (patch)
tree1c0a780fbcf146c4b62dc765881bd1dd7010f8ed /spec/controllers/boards/issues_controller_spec.rb
parent52bdcdff20127b09b5f088138b899c9ad6a1048b (diff)
downloadgitlab-ce-ca089d91f6313b32a6381aef36583e83869f4017.tar.gz
Modified spec so a second call to json_response is avoided35757-add-result-to-request
Diffstat (limited to 'spec/controllers/boards/issues_controller_spec.rb')
-rw-r--r--spec/controllers/boards/issues_controller_spec.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/controllers/boards/issues_controller_spec.rb b/spec/controllers/boards/issues_controller_spec.rb
index 2f0a8f93bd5..0db58fbefc1 100644
--- a/spec/controllers/boards/issues_controller_spec.rb
+++ b/spec/controllers/boards/issues_controller_spec.rb
@@ -196,7 +196,7 @@ describe Boards::IssuesController do
sign_in(signed_in_user)
end
- it 'moves issues as expected' do
+ it 'responds as expected' do
put :bulk_move, params: move_issues_params
expect(response).to have_gitlab_http_status(expected_status)
@@ -208,13 +208,18 @@ describe Boards::IssuesController do
expect(json_response['issues'].pluck('id')).to match_array(move_issues_params[:ids])
end
+ end
+
+ it 'moves issues as expected' do
+ put :bulk_move, params: move_issues_params
+ 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 match_response_schema('entities/issue_boards')
- responded_issues = JSON.parse(response.body)['issues']
+ responded_issues = json_response['issues']
expect(responded_issues.length).to eq expected_issue_count
ids_in_order = responded_issues.pluck('id')