From 26fd453ca4ecca06389c5288527f6c870357732d Mon Sep 17 00:00:00 2001 From: Jens Ulferts Date: Wed, 21 Sep 2016 12:00:53 +0200 Subject: [PATCH] handle spec permissions the new way --- spec/lib/open_project/costs/default_data_spec.rb | 2 +- spec/models/work_package/ask_before_destruction_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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