Skip to content

Commit

Permalink
Fix failing tests (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisgreg authored May 2, 2024
2 parents 2456cf2 + 34d075b commit 32b2fbf
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions test/tasks/install_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ defmodule Mix.Tasks.Bloom.InstallTest do
"glow_button component installed successfully ✅ - lib/bloom_web/components/glow_button.ex"
end)

expect(ShellMock, :info, fn msg ->
assert msg ==
"Don't forget to import the component to your bloom_web.ex` file."
end)

Mix.Tasks.Bloom.Install.run(["glow_button"])
end

Expand All @@ -33,7 +38,8 @@ defmodule Mix.Tasks.Bloom.InstallTest do
end)

expect(ShellMock, :info, fn msg ->
assert msg == "Available components: glow_button"
assert msg ==
"Available components: glow_button | code_snippet | hero | gradient_text | bento_grid | card | marquee"
end)

Mix.Tasks.Bloom.Install.run(["nonexistent_component"])
Expand All @@ -45,7 +51,8 @@ defmodule Mix.Tasks.Bloom.InstallTest do
end)

expect(ShellMock, :info, fn msg ->
assert msg == "Available components: glow_button"
assert msg ==
"Available components: glow_button | code_snippet | hero | gradient_text | bento_grid | card | marquee"
end)

Mix.Tasks.Bloom.Install.run([])
Expand All @@ -64,6 +71,11 @@ defmodule Mix.Tasks.Bloom.InstallTest do
"glow_button component installed successfully ✅ - lib/bloom_web/components/glow_button.ex"
end)

expect(ShellMock, :info, fn msg ->
assert msg ==
"Don't forget to import the component to your bloom_web.ex` file."
end)

Mix.Tasks.Bloom.Install.install_component("glow_button")
end
end
Expand Down

0 comments on commit 32b2fbf

Please sign in to comment.