Sha256: 172ca47338e7895f718c7ce019b70d74171441db2b5ba9de63e887f9f24a8940

Contents?: true

Size: 867 Bytes

Versions: 6

Compression:

Stored size: 867 Bytes

Contents

require 'spec_helper'

describe 'Check All', type: :view do
  before(:all) do
    @document_list = ['a', 'b', 'c']
    @batch_size_on_other_page = 0
    @max_batch_size = 100
  end

  it 'renders batch edits actions' do
    allow(controller).to receive(:controller_name).and_return('batch_edits')
    controller.prepend_view_path "app/views/batch_edits"
    html = render partial: 'batch_edits/check_all'
    expect(html).to have_selector("li[data-behavior='batch-edit-select-abc']")
  end

  it 'renders actions for my items' do
    allow(controller).to receive(:controller_name).and_return('my')
    controller.prepend_view_path "app/views/my"
    html = render partial: 'batch_edits/check_all'
    expect(html).to have_selector("li[data-behavior='batch-edit-select-none']")
    expect(html).to have_selector("li[data-behavior='batch-edit-select-page']")
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
sufia-6.7.0 spec/views/batch_edits/check_all_spec.rb
sufia-6.6.1 spec/views/batch_edits/check_all_spec.rb
sufia-6.6.0 spec/views/batch_edits/check_all_spec.rb
sufia-6.5.0 spec/views/batch_edits/check_all_spec.rb
sufia-6.4.0 spec/views/batch_edits/check_all_spec.rb
sufia-6.3.0 spec/views/batch_edits/check_all_spec.rb