diff --git a/app/views/cards/_card.json.jbuilder b/app/views/cards/_card.json.jbuilder index f8e727732..bccf51d6e 100644 --- a/app/views/cards/_card.json.jbuilder +++ b/app/views/cards/_card.json.jbuilder @@ -8,6 +8,7 @@ json.cache! card do json.tags card.tags.pluck(:title).sort json.closed card.closed? + json.postponed card.postponed? json.golden card.golden? json.last_active_at card.last_active_at.utc json.created_at card.created_at.utc diff --git a/app/views/notifications/_notification.json.jbuilder b/app/views/notifications/_notification.json.jbuilder index d4dce9fff..ae166f44a 100644 --- a/app/views/notifications/_notification.json.jbuilder +++ b/app/views/notifications/_notification.json.jbuilder @@ -12,6 +12,8 @@ json.cache! notification do json.card do json.(notification.card, :id, :number, :title, :status) json.board_name notification.card.board.name + json.closed notification.card.closed? + json.postponed notification.card.postponed? json.url card_url(notification.card) json.column notification.card.column, partial: "columns/column", as: :column if notification.card.column end diff --git a/test/controllers/cards_controller_test.rb b/test/controllers/cards_controller_test.rb index 8007657d4..b22a8eea6 100644 --- a/test/controllers/cards_controller_test.rb +++ b/test/controllers/cards_controller_test.rb @@ -171,6 +171,7 @@ class CardsControllerTest < ActionDispatch::IntegrationTest assert_equal card.title, @response.parsed_body["title"] assert_equal card.closed?, @response.parsed_body["closed"] + assert_equal card.postponed?, @response.parsed_body["postponed"] assert_equal 2, @response.parsed_body["steps"].size assert_equal card_comments_url(card), @response.parsed_body["comments_url"] assert_equal card_reactions_url(card), @response.parsed_body["reactions_url"] diff --git a/test/controllers/notifications_controller_test.rb b/test/controllers/notifications_controller_test.rb index aa9c283a5..29b454ebd 100644 --- a/test/controllers/notifications_controller_test.rb +++ b/test/controllers/notifications_controller_test.rb @@ -26,5 +26,9 @@ class NotificationsControllerTest < ActionDispatch::IntegrationTest assert_not_nil notification.dig("card", "number") assert_not_nil notification.dig("card", "board_name") assert_not_nil notification.dig("card", "column") + + card = notifications(:logo_assignment_kevin).card + assert_equal card.closed?, notification.dig("card", "closed") + assert_equal card.postponed?, notification.dig("card", "postponed") end end