-defmodule UsingAppsignalPhoenixChannel do
+defmodule DecoratedPhoenixChannel do
   import Appsignal.Phoenix.Channel, only: [channel_action: 5]
   use Appsignal.Instrumentation.Decorators
 

    ]
  end

  test "instruments a channel action with a decorator", %{socket: socket, fake_transaction: fake_transaction} do
    UsingAppsignalPhoenixChannel.handle_in("decorated", %{"body" => "Hello, world!"}, socket)

    assert [{"123", :channel}] == FakeTransaction.started_transactions(fake_transaction)
    assert "UsingAppsignalPhoenixChannel#decorated"
      == FakeTransaction.action(fake_transaction)
    assert %{
      "environment" => %{
        channel: PhoenixChatExampleWeb.RoomChannel,

  end

  test "filters parameters", %{socket: socket, fake_transaction: fake_transaction} do
    AppsignalTest.Utils.with_config(%{filter_parameters: ["password"]}, fn ->
      InstrumentedPhoenixChannel.handle_in("instrumented", %{"password" => "secret"}, socket)
      assert "[FILTERED]" == FakeTransaction.sample_data(fake_transaction)["params"]["password"]
    end)
  end
