module Turbo::TestAssertions

def assert_no_turbo_stream(action:, target: nil, targets: nil)

def assert_no_turbo_stream(action:, target: nil, targets: nil)
  assert_equal Mime[:turbo_stream], response.media_type
  selector =  %(turbo-stream[action="#{action}"])
  selector << %([target="#{target.respond_to?(:to_key) ? dom_id(target) : target}"]) if target
  selector << %([targets="#{targets}"]) if targets
  assert_select selector, count: 0
end