Make sure column-related methods keep things consistent
This commit is contained in:
@@ -26,10 +26,4 @@ module Card::Postponable
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def resume
|
||||
if postponed?
|
||||
not_now.destroy
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user