Skip to content

Commit

Permalink
chore: stop notifying transitions for now
Browse files Browse the repository at this point in the history
  • Loading branch information
lhguerra committed Nov 12, 2024
1 parent 965e7a3 commit bb84931
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/jobs/slack/demand_slack_notifications_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def process_assignments(demand)

demand.item_assignments.reload.where(assignment_notified: false).each do |assignment|
demand_url = company_demand_url(demand.company, demand)
Slack::SlackNotificationService.instance.notify_item_assigned(assignment, demand_url)
# Slack::SlackNotificationService.instance.notify_item_assigned(assignment, demand_url)
ItemAssignment.transaction { assignment.update(assignment_notified: true) }
end
end
Expand Down
20 changes: 10 additions & 10 deletions spec/jobs/slack/demand_slack_notifications_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@
end
end

context 'with assignments' do
it 'calls the notification method for the assignments not notified yet' do
Fabricate :item_assignment, demand: demand, assignment_notified: false
Fabricate :item_assignment, demand: demand, assignment_notified: false
Fabricate :item_assignment, demand: demand, assignment_notified: true

expect_any_instance_of(Slack::SlackNotificationService).to receive(:notify_item_assigned).twice
described_class.perform_now(team)
end
end
# context 'with assignments' do
# it 'calls the notification method for the assignments not notified yet' do
# Fabricate :item_assignment, demand: demand, assignment_notified: false
# Fabricate :item_assignment, demand: demand, assignment_notified: false
# Fabricate :item_assignment, demand: demand, assignment_notified: true
#
# # expect_any_instance_of(Slack::SlackNotificationService).to receive(:notify_item_assigned).twice
# described_class.perform_now(team)
# end
# end
end
end

0 comments on commit bb84931

Please sign in to comment.