blob: 9dc152872a6fdbb0c3d9b0120dba68ce8d51d523 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Mutations::Issues::SetAssignees do
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
subject do
mutation.resolve(
project_path: issue.project.full_path,
iid: issue.iid,
operation_mode: Types::MutationOperationModeEnum.default_mode,
assignee_usernames: [assignee.username]
)
end
it_behaves_like 'permission level for issue mutation is correctly verified'
end
end
it_behaves_like 'an assignable resource' do
let_it_be(:resource, reload: true) { create(:issue) }
end
end
|