Commit a216d424 authored by Jarka Kadlecová's avatar Jarka Kadlecová

use correct params format for epic_issue update

parent e4996a83
......@@ -9,7 +9,7 @@ class Groups::EpicIssuesController < Groups::EpicsController
before_action :authorize_issue_link_association!, only: [:destroy, :update]
def update
result = EpicIssues::UpdateService.new(link, current_user, params).execute
result = EpicIssues::UpdateService.new(link, current_user, params[:epic]).execute
render json: { message: result[:message] }, status: result[:http_status]
end
......
......@@ -151,7 +151,7 @@ describe Groups::EpicIssuesController do
let!(:epic_issue2) { create(:epic_issue, epic: epic, issue: issue2, position: 2) }
subject do
put :update, group_id: group, epic_id: epic.to_param, id: epic_issue1.id, position: 1
put :update, group_id: group, epic_id: epic.to_param, id: epic_issue1.id, epic: { position: 1 }
end
context 'when user has permissions to admin the epic' do
......@@ -184,7 +184,7 @@ describe Groups::EpicIssuesController do
context 'when the epic from the association does not equal epic from the path' do
subject do
put :update, group_id: group, epic_id: another_epic.to_param, id: epic_issue1.id, position: 2
put :update, group_id: group, epic_id: another_epic.to_param, id: epic_issue1.id, epic: { position: 2 }
end
let(:another_epic) { create(:epic, group: group) }
......
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