debian-mirror-gitlab/spec/graphql/mutations/work_items/update_spec.rb

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

22 lines
844 B
Ruby
Raw Normal View History

2023-06-20 00:43:36 +05:30
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Mutations::WorkItems::Update, feature_category: :portfolio_management do
let_it_be(:project) { create(:project) }
let_it_be(:developer) { create(:user).tap { |user| project.add_developer(user) } }
let_it_be(:current_work_item) { create(:work_item, :task, project: project) }
let_it_be(:parent_work_item) { create(:work_item, project: project) }
subject(:mutation) { described_class.new(object: nil, context: { current_user: current_user }, field: nil) }
describe '#ready?' do
let(:current_user) { developer }
let(:current_gid) { current_work_item.to_gid.to_s }
let(:parent_gid) { parent_work_item.to_gid.to_s }
let(:valid_arguments) { { id: current_gid, parent_id: parent_gid } }
it { is_expected.to be_ready(**valid_arguments) }
end
end