2021-01-03 14:25:43 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
RSpec.describe Mutations::Boards::Lists::Destroy do
|
|
|
|
include GraphqlHelpers
|
|
|
|
|
|
|
|
let_it_be(:current_user, reload: true) { create(:user) }
|
|
|
|
|
2021-06-08 01:23:25 +05:30
|
|
|
it_behaves_like 'board lists destroy request' do
|
|
|
|
let_it_be(:group, reload: true) { create(:group) }
|
|
|
|
let_it_be(:board) { create(:board, group: group) }
|
|
|
|
let_it_be(:list, refind: true) { create(:list, board: board) }
|
2021-01-03 14:25:43 +05:30
|
|
|
|
2021-06-08 01:23:25 +05:30
|
|
|
let(:variables) do
|
|
|
|
{
|
|
|
|
list_id: GitlabSchema.id_from_object(list).to_s
|
|
|
|
}
|
2021-01-03 14:25:43 +05:30
|
|
|
end
|
|
|
|
|
2021-06-08 01:23:25 +05:30
|
|
|
let(:mutation) do
|
|
|
|
graphql_mutation(:destroy_board_list, variables)
|
2021-01-03 14:25:43 +05:30
|
|
|
end
|
|
|
|
|
2021-06-08 01:23:25 +05:30
|
|
|
let(:mutation_response) { graphql_mutation_response(:destroy_board_list) }
|
|
|
|
let(:klass) { List }
|
2021-01-03 14:25:43 +05:30
|
|
|
end
|
|
|
|
end
|