-
Notifications
You must be signed in to change notification settings - Fork 935
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
366 additions
and
46 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
defmodule Phoenix.WarningsTest do | ||
use ExUnit.Case, async: true | ||
|
||
@moduletag :after_verify | ||
import ExUnit.CaptureIO | ||
|
||
test "deprecated preload/1" do | ||
warnings = | ||
capture_io(:stderr, fn -> | ||
defmodule DeprecatedPreloadComponent do | ||
use Phoenix.LiveComponent | ||
|
||
def preload(list_of_assigns) do | ||
list_of_assigns | ||
end | ||
|
||
def render(assigns) do | ||
~H"<div></div>" | ||
end | ||
end | ||
end) | ||
|
||
assert warnings =~ | ||
"LiveComponent.preload/1 is deprecated (defind in Phoenix.WarningsTest.DeprecatedPreloadComponent). Use LiveComponent.update_many/2 instead" | ||
end | ||
end |
Oops, something went wrong.