diff options
Diffstat (limited to 'spec/policies/note_policy_spec.rb')
-rw-r--r-- | spec/policies/note_policy_spec.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/spec/policies/note_policy_spec.rb b/spec/policies/note_policy_spec.rb index f4abe3a223c..b2191e6925d 100644 --- a/spec/policies/note_policy_spec.rb +++ b/spec/policies/note_policy_spec.rb @@ -260,9 +260,7 @@ RSpec.describe NotePolicy, feature_category: :team_planning do let(:policy) { described_class.new(developer, note) } before do - widgets_per_type = WorkItems::Type::WIDGETS_FOR_TYPE.dup - widgets_per_type[:task] = [::WorkItems::Widgets::Description] - stub_const('WorkItems::Type::WIDGETS_FOR_TYPE', widgets_per_type) + WorkItems::Type.default_by_type(:task).widget_definitions.find_by_widget_type(:notes).update!(disabled: true) end context 'when noteable is task' do |