Add top-level API index support for tags

This commit is contained in:
Jay Ohms
2025-12-03 08:12:04 -05:00
committed by Stanko K.R.
parent 5ad7b973cb
commit 680f9c0c4d
5 changed files with 21 additions and 0 deletions
+8
View File
@@ -48,6 +48,14 @@ class ApiTest < ActionDispatch::IntegrationTest
assert_equal "My new card", @response.parsed_body["title"]
end
test "get tags" do
tags = users(:david).account.tags.all.alphabetically
get tags_path(format: :json), env: @davids_bearer_token
assert_equal tags.count, @response.parsed_body.count
assert_equal tags.pluck(:title), @response.parsed_body.pluck("title")
end
test "get users" do
get users_path(format: :json), env: @davids_bearer_token
assert_equal users(:david).account.users.active.count, @response.parsed_body.count