debian-mirror-gitlab/spec/graphql/mutations/issues/set_assignees_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
914 B
Ruby
Raw Normal View History

2020-10-24 23:57:45 +05:30
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Mutations::Issues::SetAssignees do
2021-01-29 00:20:46 +05:30
context 'when the user does not have permissions' do
let_it_be(:issue) { create(:issue) }
let_it_be(:user) { create(:user) }
let_it_be(:assignee) { create(:user) }
subject(:mutation) { described_class.new(object: nil, context: { current_user: user }, field: nil) }
describe '#resolve' do
2021-04-29 21:17:54 +05:30
subject do
mutation.resolve(project_path: issue.project.full_path,
iid: issue.iid,
operation_mode: Types::MutationOperationModeEnum.default_mode,
assignee_usernames: [assignee.username])
end
2021-01-29 00:20:46 +05:30
it_behaves_like 'permission level for issue mutation is correctly verified'
end
end
2020-10-24 23:57:45 +05:30
it_behaves_like 'an assignable resource' do
let_it_be(:resource, reload: true) { create(:issue) }
end
end