Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/mix/tasks/hex.publish.ex
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ defmodule Mix.Tasks.Hex.Publish do
end

Hex.Shell.info("")
Hex.Shell.info(["Docs published to ", location])
Hex.Shell.info(["Docs will soon be available at ", location])
:ok

{:ok, {404, _, _}} ->
Expand Down
25 changes: 18 additions & 7 deletions test/mix/tasks/hex.publish_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,9 @@ defmodule Mix.Tasks.Hex.PublishTest do
Mix.Tasks.Hex.Publish.run(["docs", "--no-progress", "--replace"])

assert_received {:mix_shell, :info,
["Docs published to http://localhost:4043/docs/ex_doc-0.1.0.tar.gz"]}
[
"Docs will soon be available at http://localhost:4043/docs/ex_doc-0.1.0.tar.gz"
]}

send(self(), {:mix_shell_input, :prompt, "hunter42"})
Mix.Tasks.Hex.Publish.run(["docs", "--revert", "0.1.0"])
Expand Down Expand Up @@ -234,7 +236,9 @@ defmodule Mix.Tasks.Hex.PublishTest do
Mix.Tasks.Hex.Publish.run(["docs", "--no-progress", "--replace"])

refute_received {:mix_shell, :info,
["Docs published to https://hexdocs.pm/invalid_filename/0.1.0"]}
[
"Docs will soon be available at https://hexdocs.pm/invalid_filename/0.1.0"
]}
end
end)
end
Expand All @@ -253,7 +257,9 @@ defmodule Mix.Tasks.Hex.PublishTest do
Mix.Tasks.Hex.Publish.run(["docs", "--no-progress", "--replace"])

refute_received {:mix_shell, :info,
["Docs published to https://hexdocs.pm/invalid_dirname/0.1.0"]}
[
"Docs will soon be available at https://hexdocs.pm/invalid_dirname/0.1.0"
]}
end
end)
end
Expand All @@ -271,7 +277,8 @@ defmodule Mix.Tasks.Hex.PublishTest do
send(self(), {:mix_shell_input, :prompt, "hunter42"})
Mix.Tasks.Hex.Publish.run(["docs", "--no-progress", "--replace"])

refute_received {:mix_shell, :info, ["Docs published to https://hexdocs.pm/ex_doc/0.1.0"]}
refute_received {:mix_shell, :info,
["Docs will soon be available at https://hexdocs.pm/ex_doc/0.1.0"]}
end
end)
end
Expand All @@ -287,7 +294,9 @@ defmodule Mix.Tasks.Hex.PublishTest do
Mix.Tasks.Hex.Publish.run(["docs", "--no-progress", "--replace"])

assert_received {:mix_shell, :info,
["Docs published to http://localhost:4043/docs/ex_doc-0.1.0.tar.gz"]}
[
"Docs will soon be available at http://localhost:4043/docs/ex_doc-0.1.0.tar.gz"
]}
end)
end

Expand All @@ -302,7 +311,9 @@ defmodule Mix.Tasks.Hex.PublishTest do
Mix.Tasks.Hex.Publish.run(["docs", "--no-progress", "--replace"])

assert_received {:mix_shell, :info,
["Docs published to http://localhost:4043/docs/ex_doc-0.1.0.tar.gz"]}
[
"Docs will soon be available at http://localhost:4043/docs/ex_doc-0.1.0.tar.gz"
]}
end)
end

Expand Down Expand Up @@ -395,7 +406,7 @@ defmodule Mix.Tasks.Hex.PublishTest do
Mix.Tasks.Hex.Publish.run(["--dry-run", "--yes", "--replace"])
assert_received {:mix_shell, :info, ["Building publish_package_name_docs_dry_run 0.0.1"]}
refute_received {:mix_shell, :info, ["Package published to" <> _]}
refute_received {:mix_shell, :info, ["Docs published to" <> _]}
refute_received {:mix_shell, :info, ["Docs will soon be available at" <> _]}
end)
after
purge([ReleaseName.MixProject])
Expand Down
Loading