-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
8 changed files
with
45 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
defmodule Bonfire.UI.Me.Boundaries.InstanceWideGhostActorTest do | ||
use Bonfire.UI.Me.ConnCase, async: true | ||
# import Bonfire.Boundaries.Debug | ||
alias ActivityPub.Config | ||
|
||
test "instance-wide ghosted local user cannot switch to that or any other identity" do | ||
bob = fake_account!() | ||
alice_user = fake_user!(bob) | ||
bob_user = fake_user!(bob) | ||
Bonfire.Boundaries.Blocks.block(bob_user, :ghost, :instance_wide) | ||
|
||
conn = conn(account: bob) | ||
assert catch_throw(get(conn, "/switch-user/#{bob_user.character.username}")) | ||
|
||
assert catch_throw(get(conn, "/switch-user/#{alice_user.character.username}")) | ||
|
||
# assert redirected_to(conn) == "/switch-user" | ||
# assert catch_throw(get(recycle(conn), "/switch-user") |> warn("swwww")) | ||
conn = get(recycle(conn), "/switch-user") | ||
# doc = floki_response(conn) | ||
assert redirected_to(conn) == "/login" | ||
# conn = get(recycle(conn), "/error") | ||
# doc = floki_response(conn) | ||
# assert [err] = find_flash(doc) | ||
# assert_flash_kind(err, :error) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters