Skip to content

Commit

Permalink
Remove outdated regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
bf4 committed Jan 14, 2016
1 parent 64cfa5f commit 63a47f5
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
23 changes: 0 additions & 23 deletions test/active_model_serializers/test/serializer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,13 @@ class SerializerTest < ActionController::TestCase
include ActiveModelSerializers::Test::Serializer

class MyController < ActionController::Base
TEMPLATE_NAME = 'template'
def render_using_serializer
render json: Profile.new(name: 'Name 1', description: 'Description 1', comments: 'Comments 1')
end

def render_some_text
render text: 'ok'
end

def render_a_template
prepend_view_path './test/fixtures'
render template: TEMPLATE_NAME
end
end

tests MyController
Expand Down Expand Up @@ -63,23 +57,6 @@ def test_raises_argument_error_when_asserting_with_invalid_object
end
assert_match 'assert_serializer only accepts a String, Symbol, Regexp, ActiveModel::Serializer, or nil', e.message
end

def test_does_not_overwrite_notification_subscriptions
payloads = []
event_name = '!render_template.action_view'
ActiveSupport::Notifications.subscribe(event_name) do |_name, _start, _finish, _id, payload|
payloads << payload
end

get :render_a_template

assert_equal 1, payloads.size, 'Only expected one template rendering to be registered'
payload = payloads.first
assert_equal MyController::TEMPLATE_NAME, payload[:virtual_path]
assert_match %r{test/fixtures/#{MyController::TEMPLATE_NAME}.html.erb}, payload[:identifier]
ensure
ActiveSupport::Notifications.unsubscribe(event_name)
end
end
end
end
1 change: 0 additions & 1 deletion test/fixtures/template.html.erb

This file was deleted.

0 comments on commit 63a47f5

Please sign in to comment.