Commit 43184bc8 authored by Sean Arnold's avatar Sean Arnold

Add changelog file

parent c3196212
---
title: Add create On-call rotations GraphQL mutation
merge_request: 49206
author:
type: added
......@@ -39,7 +39,7 @@ module Mutations
def resolve(iid:, project_path:, participants:, **args)
project = authorized_find!(full_path: project_path)
schedule = ::IncidentManagement::OncallSchedulesFinder.new(current_user, project, iids: iid)
schedule = ::IncidentManagement::OncallSchedulesFinder.new(current_user, project, iid: iid)
.execute
.first
......
......@@ -14,7 +14,7 @@ RSpec.describe Mutations::IncidentManagement::OncallRotation::Create do
starts_at: "2020-01-10 09:00".in_time_zone(schedule.timezone),
rotation_length: {
length: 1,
unit: ::IncidentManagement::OncallRotation.rotation_length_units[:days]
unit: ::IncidentManagement::OncallRotation.length_units[:days]
},
participants: [
{
......@@ -87,7 +87,7 @@ RSpec.describe Mutations::IncidentManagement::OncallRotation::Create do
end
it 'raises an error' do
expect { resolve }.to raise_error(ActiveRecord::RecordInvalid, /participant does not have access to the project/)
expect { resolve }.to raise_error(ActiveRecord::RecordInvalid, /Participant does not have access to the project/)
end
end
......
......@@ -12,8 +12,8 @@ RSpec.describe GitlabSchema.types['IncidentManagementOncallRotation'] do
id
name
starts_at
rotation_length
rotation_length_unit
length
length_unit
participants
]
......
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