Sha256: f5398c99309e1a09b9698aff58d8ef9b534c5498976c865e5eec3b7f6fa1ff8a
Contents?: true
Size: 667 Bytes
Versions: 7
Compression:
Stored size: 667 Bytes
Contents
require 'spec_helper' RSpec.describe NsSettingsUi::SettingsHelper, type: :helper do describe '.setting_value_class' do let(:setting) { NsSettingsUi::Setting.make!(key: 'matching.cluster_size', value: value, default_value: '5') } subject { helper.setting_value_class(setting) } context 'when value is empty' do let(:value) { '' } it { is_expected.to eq('alert-danger') } end context 'when value is different than default' do let(:value) { '10' } it { is_expected.to eq('alert-warning') } end context 'when value is default' do let(:value) { '5' } it { is_expected.to eq('') } end end end
Version data entries
7 entries across 7 versions & 1 rubygems