Skip to content

Commit

Permalink
Tests: Events - tap into update.
Browse files Browse the repository at this point in the history
  • Loading branch information
cpursley committed Jan 3, 2024
1 parent f4a95f0 commit 37d338c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions test/walex/event_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule WalEx.EventTest do

require Logger

@app_name :test_name
@app_name :test_app
@hostname "localhost"
@username "postgres"
@password "postgres"
Expand All @@ -25,6 +25,7 @@ defmodule WalEx.EventTest do
# How can we test this? TestModule does not seem to get called.
assert_raise "test error", fn ->
Postgrex.query!(database_pid, update_user, [])
|> tap(&Logger.debug("Updated user: #{inspect(&1, pretty: true)}"))
end
end
end
Expand All @@ -46,9 +47,9 @@ defmodule WalEx.EventTest do
password: @password,
database: @database,
port: 5432,
subscriptions: [:user, :todo],
subscriptions: ["user", "todo"],
publication: ["events"],
modules: [TestName.TestModule]
modules: [TestApp.TestModule]
]

case keys do
Expand All @@ -61,8 +62,8 @@ defmodule WalEx.EventTest do
end
end

defmodule TestName.TestModule do
use WalEx.Event, name: :test_name
defmodule TestApp.TestModule do
use WalEx.Event, name: :test_app

require Logger

Expand Down

0 comments on commit 37d338c

Please sign in to comment.