Make sure column-related methods keep things consistent

This commit is contained in:
Jorge Manrubia
2025-09-26 11:33:47 +02:00
parent 20dd87b2bf
commit 67d57cb02a
3 changed files with 11 additions and 12 deletions
-6
View File
@@ -26,10 +26,4 @@ module Card::Postponable
end
end
end
def resume
if postponed?
not_now.destroy
end
end
end
+11 -2
View File
@@ -18,10 +18,19 @@ module Card::Triageable
def triage_into(column)
raise "The column must belong to the card collection" unless collection == column.collection
update! column: column
transaction do
reopen
activity_spike&.destroy
update! column: column
end
end
def send_back_to_triage
update!(column: nil)
transaction do
reopen
activity_spike&.destroy
update!(column: nil)
end
end
end
-4
View File
@@ -22,10 +22,6 @@ class Card::PostponableTest < ActiveSupport::TestCase
assert_changes -> { card.reload.postponed? }, to: true do
card.postpone
end
assert_changes -> { card.reload.postponed? }, to: false do
card.resume
end
end
test "scopes" do