Skip to content

Commit

Permalink
Fix AMS tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
gregschmit committed Dec 14, 2024
1 parent 3f69b33 commit 99b7ab6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class Api::Test::ActiveModelSerializer::UsersController < Api::TestController
include RESTFramework::ModelControllerMixin

self.serializer_class = UserSerializer
end
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ def test_list
User.create!(login: "test", manager_attributes: {login: "test2"})
get(:index, as: :json)
assert_response(:success)
assert(@response.parsed_body[0]["login"])
assert(@response.parsed_body[0]["manager"])
assert_equal("working!", @response.parsed_body[0]["test_serializer_method"])
puts @response.parsed_body
assert(@response.parsed_body[1]["login"])
assert(@response.parsed_body[1]["manager"])
assert_equal("working!", @response.parsed_body[1]["test_serializer_method"])
assert_nil(@response.parsed_body[0]["calculated_property"])
end

Expand Down

0 comments on commit 99b7ab6

Please sign in to comment.