mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 15:23:06 +00:00
Avoid overwriting notifications for template assertions.
This commit is contained in:
1
test/fixtures/template.html.erb
vendored
Normal file
1
test/fixtures/template.html.erb
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<p>Hello.</p>
|
||||
@@ -11,6 +11,11 @@ module ActionController
|
||||
def render_text
|
||||
render text: 'ok'
|
||||
end
|
||||
|
||||
def render_template
|
||||
prepend_view_path "./test/fixtures"
|
||||
render template: "template"
|
||||
end
|
||||
end
|
||||
|
||||
tests MyController
|
||||
@@ -56,6 +61,11 @@ module ActionController
|
||||
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
|
||||
get :render_template
|
||||
assert_template "template"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user