Sha256: 14c8589566c5d2c0da12bad70f810e9729992d2f9a31840f3eb99c9333e2ff04
Contents?: true
Size: 1.06 KB
Versions: 3
Compression:
Stored size: 1.06 KB
Contents
require 'spec_helper' describe BatchEditsHelper do describe "#render_check_all" do before do @document_list = ["doc1", "doc2"] @batch_size_on_other_page = 1 @max_batch_size = 10 end context "with my files" do it "should show the check all dropdown" do allow(helper).to receive(:params).and_return({ controller: "my/files" }) allow(helper).to receive(:controller_name).and_return("batch_edits") expect(helper.render_check_all).to have_css("span.glyphicon-cog") end end context "with my collections" do it "should not show the check all dropdown" do allow(helper).to receive(:params).and_return({ controller: "my/collections" }) expect(helper.render_check_all).to be_nil end end context "with select all disabled" do it "should not show the check all dropdown" do allow(helper).to receive(:params).and_return({ controller: "foo" }) assign(:disable_select_all, true) expect(helper.render_check_all).to be_nil end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
sufia-4.0.1 | spec/helpers/batch_edits_helper_spec.rb |
sufia-4.0.0 | spec/helpers/batch_edits_helper_spec.rb |
sufia-4.0.0.rc2 | spec/helpers/batch_edits_helper_spec.rb |