You've already forked tribes-plugin-aether
forked from tribes/tribes-plugin-template
Rename to aether plugin and add /aether timeline integration
This commit is contained in:
27
test/aether/host_integration_test.exs
Normal file
27
test/aether/host_integration_test.exs
Normal file
@@ -0,0 +1,27 @@
|
||||
defmodule Aether.HostIntegrationTest do
|
||||
use ExUnit.Case, async: false
|
||||
|
||||
setup do
|
||||
start_supervised!({Tribes.PluginRegistry, []})
|
||||
|
||||
spec = Tribes.Plugins.Aether.Plugin.register(%{pubsub: nil, repo: nil})
|
||||
:ok = Tribes.PluginRegistry.register_plugin(spec.name, spec, "/tmp/aether")
|
||||
|
||||
on_exit(fn ->
|
||||
:ok = Tribes.PluginRegistry.unregister_plugin(spec.name)
|
||||
end)
|
||||
|
||||
%{spec: spec}
|
||||
end
|
||||
|
||||
test "registers timeline capability and /aether route with host", %{spec: spec} do
|
||||
assert spec.name == "aether"
|
||||
assert %{name: "aether"} = Tribes.PluginRegistry.provider!("timeline_ui@1")
|
||||
|
||||
assert {:ok, "aether", %{path: "/aether"}} =
|
||||
Tribes.PluginRegistry.page_for_path("/aether/tribe-123")
|
||||
|
||||
assert TribesWeb.Navigation.timeline_base_path() == "/aether"
|
||||
assert TribesWeb.Navigation.timeline_path("tribe-123") == "/aether/tribe-123"
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user