stabilize spec by ensuring a user to be present

pull/7920/head
ulferts 5 years ago
parent 8511aca939
commit 305d07a175
No known key found for this signature in database
GPG Key ID: A205708DE1284017
  1. 12
      spec/models/queries/work_packages/manual_sorting_spec.rb

@ -32,8 +32,16 @@ describe Query, "manual sorting ", type: :model do
shared_let(:user) { FactoryBot.create :admin }
shared_let(:project) { FactoryBot.create :project }
shared_let(:query) { FactoryBot.create :query, user: user, project: project }
shared_let(:wp_1) { FactoryBot.create :work_package, project: project }
shared_let(:wp_2) { FactoryBot.create :work_package, project: project }
shared_let(:wp_1) do
User.execute_as user do
FactoryBot.create :work_package, project: project
end
end
shared_let(:wp_2) do
User.execute_as user do
FactoryBot.create :work_package, project: project
end
end
describe '#ordered_work_packages' do
it 'keeps the current set of ordered work packages' do

Loading…
Cancel
Save