Sha256: 4e381714e8ad5f1e18d99c9c6990661e8a729f5a2f6cf9e12b3f2cddef5fc71d
Contents?: true
Size: 867 Bytes
Versions: 6
Compression:
Stored size: 867 Bytes
Contents
require 'spec_helper' describe RecordsHelper do it "should have object_type_options" do HydraEditor.models = ['Audio', 'Pdf'] I18n.stub(:t).with("hydra.model_label.Audio", default: 'Audio').and_return('Audio') I18n.stub(:t).with("hydra.model_label.Pdf", default: 'Pdf').and_return('PDF') helper.object_type_options.should == {'Audio' => 'Audio', 'PDF' => 'Pdf'} end it "draws add button" do helper.add_field(:test).should == "<button class=\"adder btn\" id=\"additional_test_submit\" name=\"additional_test\">+<span class=\"accessible-hidden\">add another test</span></button>" end it "draws subtract button" do helper.subtract_field(:test).should == "<button class=\"remover btn\" id=\"additional_test_submit\" name=\"additional_test\">-<span class=\"accessible-hidden\">add another test</span></button>" end end
Version data entries
6 entries across 6 versions & 1 rubygems