Skip to content

Commit

Permalink
Update lib/bitstyles_phoenix/bitstyles.ex
Browse files Browse the repository at this point in the history
Co-authored-by: Andreas Knöpfle <[email protected]>
  • Loading branch information
angelikatyborska and andreasknoepfle authored Sep 23, 2024
1 parent ecda2c8 commit 9f301e0
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/bitstyles_phoenix/bitstyles.ex
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,10 @@ defmodule BitstylesPhoenix.Bitstyles do
""")
end

defp test_only_downgrade(class, from, to) do
if Application.get_env(:bitstyles_phoenix, :add_version_test_classes, false) do
if(class == from, do: to, else: class)
else
class
end
if Application.compile_env(:bitstyles_phoenix, :add_version_test_classes, false) do
defp test_only_downgrade(from, from, to), do: to
defp test_only_downgrade(class, _, _), do: class
else
defp test_only_downgrade(class, _, _), do: class
end
end

0 comments on commit 9f301e0

Please sign in to comment.