Skip to content

Commit

Permalink
DEV: lint pending_assigns_reminder_spec.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
Grubba27 committed Apr 25, 2024
1 parent 016ffd5 commit 1b83e34
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions spec/lib/pending_assigns_reminder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,17 +144,10 @@ def assert_reminder_not_created
end

context "with assigns_reminder_assigned_topics_query" do
let(:modifier_block) do
Proc.new do |query|
query.where.not(id: @post1.topic_id)
end
end
let(:modifier_block) { Proc.new { |query| query.where.not(id: @post1.topic_id) } }
it "doesn't remind if topic is solved" do
plugin_instance = Plugin::Instance.new
plugin_instance.register_modifier(
:assigns_reminder_assigned_topics_query,
&modifier_block
)
plugin_instance.register_modifier(:assigns_reminder_assigned_topics_query, &modifier_block)
topics = reminder.send(:assigned_topics, user, order: :asc)
puts topics.inspect
expect(topics).not_to include(@post1.topic)
Expand Down

0 comments on commit 1b83e34

Please sign in to comment.