spec/web_helper_spec.rb in fluentd-server-0.1.0 vs spec/web_helper_spec.rb in fluentd-server-0.2.0

- old
+ new

@@ -20,8 +20,23 @@ expect(parse_query('name[key1]=1&name[key2]=2')).to eql( {'name' => {'key1'=>'1', 'key2'=>'2'}} ) end end + + context '#escape_url' do + it { expect(escape_url('a b')).to eql('a+b') } + end + + context '#active_if' do + it { expect(active_if(true)).to eql('active') } + it { expect(active_if(false)).to be_nil } + end + + context '#disabled_if' do + it { expect(disabled_if(true)).to eql('disabled="disabled"') } + it { expect(disabled_if(false)).to be_nil } + end + end