|
1 | 1 | defmodule Membrane.Core.Element.ActionHandlerTest do |
2 | 2 | use ExUnit.Case, async: true |
3 | 3 |
|
4 | | - alias Membrane.{ActionError, Buffer, ElementError, PadDirectionError} |
| 4 | + alias Membrane.{ActionError, Buffer, ElementError, PadDirectionError, UnknownPadError} |
5 | 5 | alias Membrane.Core.Element.State |
6 | 6 | alias Membrane.Support.DemandsTest.Filter |
7 | 7 | alias Membrane.Support.Element.{TrivialFilter, TrivialSource} |
@@ -166,7 +166,7 @@ defmodule Membrane.Core.Element.ActionHandlerTest do |
166 | 166 | test "when pad doesn't exist in the element", %{state: state} do |
167 | 167 | state = %{state | playback: :playing} |
168 | 168 |
|
169 | | - assert_raise MatchError, ~r/:unknown_pad/i, fn -> |
| 169 | + assert_raise UnknownPadError, fn -> |
170 | 170 | @module.handle_action( |
171 | 171 | buffer_action(:invalid_pad_ref), |
172 | 172 | :handle_info, |
@@ -289,7 +289,7 @@ defmodule Membrane.Core.Element.ActionHandlerTest do |
289 | 289 | test "when pad doesn't exist in the element", %{state: state} do |
290 | 290 | state = %{state | playback: :playing} |
291 | 291 |
|
292 | | - assert_raise MatchError, ~r/:unknown_pad/i, fn -> |
| 292 | + assert_raise UnknownPadError, fn -> |
293 | 293 | @module.handle_action( |
294 | 294 | event_action(:invalid_pad_ref), |
295 | 295 | :handle_info, |
@@ -360,7 +360,7 @@ defmodule Membrane.Core.Element.ActionHandlerTest do |
360 | 360 | test "when pad doesn't exist in the element", %{state: state} do |
361 | 361 | state = %{state | playback: :playing} |
362 | 362 |
|
363 | | - assert_raise MatchError, ~r/:unknown_pad/i, fn -> |
| 363 | + assert_raise UnknownPadError, fn -> |
364 | 364 | @module.handle_action( |
365 | 365 | stream_format_action(:invalid_pad_ref), |
366 | 366 | :handle_info, |
@@ -424,7 +424,7 @@ defmodule Membrane.Core.Element.ActionHandlerTest do |
424 | 424 | test "when pad doesn't exist in the element", %{state: state} do |
425 | 425 | state = %{state | playback: :playing} |
426 | 426 |
|
427 | | - assert_raise MatchError, ~r/:unknown_pad/i, fn -> |
| 427 | + assert_raise UnknownPadError, fn -> |
428 | 428 | @module.handle_action( |
429 | 429 | {:redemand, :invalid_pad_ref}, |
430 | 430 | :handle_info, |
|
0 commit comments