diff --git a/spec/lib/open_project/costs/default_data_spec.rb b/spec/lib/open_project/costs/default_data_spec.rb index e2d666b954..1b6c115f2f 100644 --- a/spec/lib/open_project/costs/default_data_spec.rb +++ b/spec/lib/open_project/costs/default_data_spec.rb @@ -44,7 +44,7 @@ describe OpenProject::Costs::DefaultData do end it 'is not loaded again on existing data' do - member.permissions.clear + member.permissions = [] member.save! seeder.seed! diff --git a/spec/models/work_package/ask_before_destruction_spec.rb b/spec/models/work_package/ask_before_destruction_spec.rb index 3ba8e9c470..08cccee066 100644 --- a/spec/models/work_package/ask_before_destruction_spec.rb +++ b/spec/models/work_package/ask_before_destruction_spec.rb @@ -192,7 +192,7 @@ describe WorkPackage, type: :model do before do work_package2.save! - role2.permissions << :edit_cost_entries + role2.add_permission! :edit_cost_entries role2.save! member2.save! end