Commit 05c739cc authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch 'sh-fix-issue-208763' into 'master'

Fix flaky import_export/group/tree_saver_spec.rb spec

Closes #208763

See merge request gitlab-org/gitlab!26539
parents 41d57ca1 ed802649
......@@ -141,15 +141,12 @@ describe Gitlab::ImportExport::Group::TreeSaver do
context 'when there are boards with predefined milestones' do
let(:milestone) { Milestone::Upcoming }
before do
create(:board, group: group, milestone_id: milestone.id)
end
let!(:board_with_milestone) { create(:board, group: group, milestone_id: milestone.id) }
it 'saves the milestone data' do
expect_successful_save(group_tree_saver)
board_data = saved_group_json['boards'].last
board_data = saved_group_json['boards'].find { |board| board['id'] == board_with_milestone.id }
expect(board_data).to include(
'milestone_id' => milestone.id,
......@@ -164,15 +161,12 @@ describe Gitlab::ImportExport::Group::TreeSaver do
context 'when there are boards with persisted milestones' do
let(:milestone) { create(:milestone) }
before do
create(:board, group: group, milestone: milestone)
end
let!(:board_with_milestone) { create(:board, group: group, milestone_id: milestone.id) }
it 'saves the milestone data' do
expect_successful_save(group_tree_saver)
board_data = saved_group_json['boards'].last
board_data = saved_group_json['boards'].find { |board| board['id'] == board_with_milestone.id }
expect(board_data).to include(
'milestone_id' => milestone.id,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment