Sha256: b53788d8f912209c4a2eca10e7771e0a3f8db40c35cf9180c192735b283b519b
Contents?: true
Size: 1.02 KB
Versions: 23
Compression:
Stored size: 1.02 KB
Contents
require_relative 'helper' class FeatureTest < Minitest::Test def test_build_feature_domain feature = MxHero::API::Feature.new data assert_equal data[:feature], feature.component assert_nil feature.updated assert_equal data[:maxRulesAmount], feature.max_rules_amount assert ! feature.unlimited_use? assert feature.metadata.is_a? Hash assert_equal feature.metadata[:appId], 719005621603 end def test_unlimited_use feature = MxHero::API::Feature.new data assert feature.max_rules_amount > 0 assert ! feature.unlimited_use? unlimited_use = data.dup unlimited_use[:maxRulesAmount] = 0 feature = MxHero::API::Feature.new unlimited_use assert_equal Float::INFINITY, feature.max_rules_amount assert feature.unlimited_use? unlimited_use[:maxRulesAmount] = nil feature = MxHero::API::Feature.new unlimited_use assert_equal Float::INFINITY, feature.max_rules_amount assert feature.unlimited_use? end def data Fixtures::Domain.data[:features].first end end
Version data entries
23 entries across 23 versions & 1 rubygems