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 ...@@ -141,15 +141,12 @@ describe Gitlab::ImportExport::Group::TreeSaver do
context 'when there are boards with predefined milestones' do context 'when there are boards with predefined milestones' do
let(:milestone) { Milestone::Upcoming } let(:milestone) { Milestone::Upcoming }
let!(:board_with_milestone) { create(:board, group: group, milestone_id: milestone.id) }
before do
create(:board, group: group, milestone_id: milestone.id)
end
it 'saves the milestone data' do it 'saves the milestone data' do
expect_successful_save(group_tree_saver) 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( expect(board_data).to include(
'milestone_id' => milestone.id, 'milestone_id' => milestone.id,
...@@ -164,15 +161,12 @@ describe Gitlab::ImportExport::Group::TreeSaver do ...@@ -164,15 +161,12 @@ describe Gitlab::ImportExport::Group::TreeSaver do
context 'when there are boards with persisted milestones' do context 'when there are boards with persisted milestones' do
let(:milestone) { create(:milestone) } let(:milestone) { create(:milestone) }
let!(:board_with_milestone) { create(:board, group: group, milestone_id: milestone.id) }
before do
create(:board, group: group, milestone: milestone)
end
it 'saves the milestone data' do it 'saves the milestone data' do
expect_successful_save(group_tree_saver) 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( expect(board_data).to include(
'milestone_id' => milestone.id, '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