Merge pull request #2105 from seuros/main
feat: expose closed boolean in card JSON API
This commit is contained in:
@@ -6,6 +6,7 @@ json.cache! card do
|
||||
|
||||
json.tags card.tags.pluck(:title).sort
|
||||
|
||||
json.closed card.closed?
|
||||
json.golden card.golden?
|
||||
json.last_active_at card.last_active_at.utc
|
||||
json.created_at card.created_at.utc
|
||||
|
||||
@@ -145,6 +145,7 @@ class CardsControllerTest < ActionDispatch::IntegrationTest
|
||||
assert_response :success
|
||||
|
||||
assert_equal card.title, @response.parsed_body["title"]
|
||||
assert_equal card.closed?, @response.parsed_body["closed"]
|
||||
assert_equal 2, @response.parsed_body["steps"].size
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user