summaryrefslogtreecommitdiff
path: root/spec/graphql/mutations/issues/create_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/graphql/mutations/issues/create_spec.rb')
-rw-r--r--spec/graphql/mutations/issues/create_spec.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/graphql/mutations/issues/create_spec.rb b/spec/graphql/mutations/issues/create_spec.rb
index 422ad40a9cb..b32f0991959 100644
--- a/spec/graphql/mutations/issues/create_spec.rb
+++ b/spec/graphql/mutations/issues/create_spec.rb
@@ -19,7 +19,8 @@ RSpec.describe Mutations::Issues::Create do
description: 'new description',
confidential: true,
due_date: Date.tomorrow,
- discussion_locked: true
+ discussion_locked: true,
+ issue_type: 'issue'
}
end
@@ -93,6 +94,16 @@ RSpec.describe Mutations::Issues::Create do
expect(mutated_issue.iid).not_to eq(special_params[:iid])
end
end
+
+ context 'when creating a non-default issue type' do
+ before do
+ mutation_params[:issue_type] = 'incident'
+ end
+
+ it 'creates issue with correct values' do
+ expect(mutated_issue.issue_type).to eq('incident')
+ end
+ end
end
context 'when creating an issue as owner' do