From ecda2c86485f1839afa0aec5545111d3d1778dc6 Mon Sep 17 00:00:00 2001 From: Angelika Tyborska Date: Thu, 19 Sep 2024 10:36:44 +0200 Subject: [PATCH] I forgot version 3.1.0 --- lib/bitstyles_phoenix/bitstyles.ex | 5 +++++ test/bitstyles_phoenix/bitstyles_test.exs | 1 + 2 files changed, 6 insertions(+) diff --git a/lib/bitstyles_phoenix/bitstyles.ex b/lib/bitstyles_phoenix/bitstyles.ex index 9902545..0a92182 100644 --- a/lib/bitstyles_phoenix/bitstyles.ex +++ b/lib/bitstyles_phoenix/bitstyles.ex @@ -133,6 +133,11 @@ defmodule BitstylesPhoenix.Bitstyles do class = test_only_downgrade(class, "u-version-4", "u-version-2") + downgrade_classname(class, target_version, {3, 1, 0}) + end + + defp downgrade_classname(class, target_version, {3, 1, 0}) do + # no changes when downgrading from 3.1.0 -> 3.0.0 downgrade_classname(class, target_version, {3, 0, 0}) end diff --git a/test/bitstyles_phoenix/bitstyles_test.exs b/test/bitstyles_phoenix/bitstyles_test.exs index c367223..d1c07e4 100644 --- a/test/bitstyles_phoenix/bitstyles_test.exs +++ b/test/bitstyles_phoenix/bitstyles_test.exs @@ -20,6 +20,7 @@ defmodule BitstylesPhoenix.BitstylesTest do assert classname("u-version-5-0-0", {4, 2, 0}) == "u-version-4" assert classname("u-version-5-0-0", {4, 1, 0}) == "u-version-4" assert classname("u-version-5-0-0", {4, 0, 0}) == "u-version-4" + assert classname("u-version-5-0-0", {3, 1, 0}) == "u-version-2" assert classname("u-version-5-0-0", {3, 0, 0}) == "u-version-2" assert classname("u-version-5-0-0", {2, 0, 0}) == "u-version-2" assert classname("u-version-5-0-0", {1, 5, 0}) == "u-version-1-4"