summaryrefslogtreecommitdiff
path: root/spec/controllers/groups/labels_controller_spec.rb
diff options
context:
space:
mode:
authorblackst0ne <blackst0ne.ru@gmail.com>2018-12-18 09:52:17 +1100
committerblackst0ne <blackst0ne.ru@gmail.com>2018-12-19 10:04:31 +1100
commitb44a2c801a64fb282cea794871fcfcf81e4ec539 (patch)
tree32e699b6efa548048abe11f29f84e85e3d2a034f /spec/controllers/groups/labels_controller_spec.rb
parent5d68c23792e87e710877e4baf57605bcf11a6cb5 (diff)
downloadgitlab-ce-b44a2c801a64fb282cea794871fcfcf81e4ec539.tar.gz
Update specs to rails5 formatblackst0ne-convert-specs-rails5-style
Updates specs to use new rails5 format. The old format: `get :show, { some: params }, { some: headers }` The new format: `get :show, params: { some: params }, headers: { some: headers }`
Diffstat (limited to 'spec/controllers/groups/labels_controller_spec.rb')
-rw-r--r--spec/controllers/groups/labels_controller_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/controllers/groups/labels_controller_spec.rb b/spec/controllers/groups/labels_controller_spec.rb
index 185b6b4ce57..fa664a29066 100644
--- a/spec/controllers/groups/labels_controller_spec.rb
+++ b/spec/controllers/groups/labels_controller_spec.rb
@@ -16,7 +16,7 @@ describe Groups::LabelsController do
set(:group_label_1) { create(:group_label, group: group, title: 'group_label_1') }
it 'returns group and project labels by default' do
- get :index, group_id: group, format: :json
+ get :index, params: { group_id: group }, format: :json
label_ids = json_response.map {|label| label['title']}
expect(label_ids).to match_array([label_1.title, group_label_1.title])
@@ -31,7 +31,7 @@ describe Groups::LabelsController do
end
it 'returns ancestor group labels', :nested_groups do
- get :index, group_id: subgroup, include_ancestor_groups: true, only_group_labels: true, format: :json
+ get :index, params: { group_id: subgroup, include_ancestor_groups: true, only_group_labels: true }, format: :json
label_ids = json_response.map {|label| label['title']}
expect(label_ids).to match_array([group_label_1.title, subgroup_label_1.title])
@@ -43,7 +43,7 @@ describe Groups::LabelsController do
it 'allows user to toggle subscription on group labels' do
label = create(:group_label, group: group)
- post :toggle_subscription, group_id: group.to_param, id: label.to_param
+ post :toggle_subscription, params: { group_id: group.to_param, id: label.to_param }
expect(response).to have_gitlab_http_status(200)
end