diff --git a/CHANGELOG.md b/CHANGELOG.md index 62b0231..afdfb0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - `cb config-param list-supported` now returns `min_value`, `max_value`, and `enum` constraints for each parameters, if applicable. +### Fixed +- `cb info` now correctly handles firewall rules with an empty description. ## [3.6.0] - 2024-07-26 ### Added diff --git a/spec/cb/firewall_rule_spec.cr b/spec/cb/firewall_rule_spec.cr index bb916ae..a757ba3 100644 --- a/spec/cb/firewall_rule_spec.cr +++ b/spec/cb/firewall_rule_spec.cr @@ -96,11 +96,13 @@ Spectator.describe FirewallRuleList do } it "outputs table with header" do + expect(client).to receive(:get_firewall_rules).and_return [Factory.firewall_rule(description: nil)] + action.call expected = <<-EXPECTED ID Rule Description - shofthj3fzaipie44lt6a5i3de 1.2.3.0/24 Example Description + shofthj3fzaipie44lt6a5i3de 1.2.3.0/24 EXPECTED expect(&.output.to_s).to look_like expected diff --git a/src/models/firewall_rule.cr b/src/models/firewall_rule.cr index 6a9dfdf..5036d43 100644 --- a/src/models/firewall_rule.cr +++ b/src/models/firewall_rule.cr @@ -1,6 +1,6 @@ module CB::Model jrecord FirewallRule, id : String, - description : String, + description : String?, rule : String end