Sha256: 79b4a95b4c932f6fd5a0fc5cc808ca7661e0b42fb4171312b9b32c5babcef163
Contents?: true
Size: 530 Bytes
Versions: 2
Compression:
Stored size: 530 Bytes
Contents
# frozen_string_literal: true require 'test_helper' if Rails::VERSION::MAJOR >= 5 class ActionControllerAPITest < ActionDispatch::IntegrationTest setup do Bookstore.create! name: 'junkudo' end test 'decorating objects in api only controllers' do get "/api/bookstores/#{Bookstore.last.id}.json" assert_equal({"initial" => "j", "name" => "junkudo"}, response.parsed_body) end test 'error handling in api only controllers' do get "/api/bookstores/error.json" assert_response :error end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
active_decorator-1.3.3 | test/features/action_controller_api_test.rb |
active_decorator-1.3.2 | test/features/action_controller_api_test.rb |