Sha256: ccd6490bc1add490d9b98ba285d93243141c9dd31dc52cbd2d69fbaf180e4f96
Contents?: true
Size: 1.41 KB
Versions: 9
Compression:
Stored size: 1.41 KB
Contents
describe BatchEditsHelper, type: :helper do describe "#render_check_all" do before do view.lookup_context.prefixes = ['my'] end context "with my works" do it "shows the check all dropdown" do allow(controller).to receive(:controller_name).and_return("my/works") expect(helper.render_check_all).to have_css("span.glyphicon-cog") end end context "with my shares" do it "shows the check all dropdown" do allow(controller).to receive(:controller_name).and_return("my/shares") expect(helper.render_check_all).to have_css("span.glyphicon-cog") end end context "with my highlights" do it "shows the check all dropdown" do allow(controller).to receive(:controller_name).and_return("my/shares") expect(helper.render_check_all).to have_css("span.glyphicon-cog") end end context "with my collections" do it "does not show the check all dropdown" do allow(controller).to receive(:controller_name).and_return("my/collections") expect(helper.render_check_all).to be_nil end end context "with select all disabled" do it "does 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 have_css("input[disabled=disabled]") end end end end
Version data entries
9 entries across 9 versions & 1 rubygems