Membrane.Testing.Assertions.assert_sink_caps
You're seeing just the macro
assert_sink_caps
, go back to Membrane.Testing.Assertions module for more information.
Link to this macro
assert_sink_caps(pipeline, element_name, caps_pattern, timeout \\ 2000)
View Source (macro)Asserts that Membrane.Testing.Sink
with name sink_name
received or will
receive caps matching pattern
within the timeout
period specified in
milliseconds.
When the Membrane.Testing.Sink
is a part of Membrane.Testing.Pipeline
you
can assert whether it received caps matching provided pattern.
{:ok, pid} = Membrane.Testing.Pipeline.start_link(%Membrane.Testing.Pipeline.Options{
elements: [
....,
the_sink: %Membrane.Testing.Sink{}
]
})
You can match for exact value:
assert_sink_caps(pid, :the_sink , %Caps{prop: ^value})
You can also use pattern to extract data from the caps:
assert_sink_caps(pid, :the_sink , %Caps{prop: value})
do_something(value)