From 34d075b8e4c33c5ab003de067200739568439552 Mon Sep 17 00:00:00 2001 From: latachz Date: Wed, 1 May 2024 23:49:11 +0200 Subject: [PATCH] Fix failing tests --- test/tasks/install_test.exs | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/test/tasks/install_test.exs b/test/tasks/install_test.exs index d078ec2..a41ce9d 100644 --- a/test/tasks/install_test.exs +++ b/test/tasks/install_test.exs @@ -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 @@ -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"]) @@ -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([]) @@ -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