Sha256: aa701a4f10062f5b886cd3564ec1831f66effe9be4c99f3f54bc3b0ecbfb2bc6

Contents?: true

Size: 708 Bytes

Versions: 13

Compression:

Stored size: 708 Bytes

Contents

require 'spec_helper'

describe "RailsAdmin Basic Bulk Action" do

  subject { page }

  before(:each) do
    @players = 2.times.map { FactoryGirl.create :player }
  end

  describe "bulk_delete" do
    it "shows names of to-be-deleted players" do
      post(bulk_action_path(:bulk_action => 'bulk_delete', :model_name => "player", :bulk_ids => @players.map(&:id)))
      @players.each { |player| expect(response.body).to include(player.name) }
    end
  end

  describe "bulk_export" do
    it "shows form for export" do
      visit index_path(:model_name => "player")
      click_link "Export found Players"
      @players.each { |player| should have_content("Select fields to export") }
    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
rails_admin-0.6.0 spec/integration/basic/bulk_action/rails_admin_basic_bulk_action_spec.rb
rails_admin-0.5.0 spec/integration/basic/bulk_action/rails_admin_basic_bulk_action_spec.rb
rails_admin-0.4.9 spec/integration/basic/bulk_action/rails_admin_basic_bulk_action_spec.rb
rails_admin-0.4.8 spec/integration/basic/bulk_action/rails_admin_basic_bulk_action_spec.rb
rails_admin-0.4.7 spec/integration/basic/bulk_action/rails_admin_basic_bulk_action_spec.rb
rails_admin-0.4.6 spec/integration/basic/bulk_action/rails_admin_basic_bulk_action_spec.rb
rails_admin-0.4.5 spec/integration/basic/bulk_action/rails_admin_basic_bulk_action_spec.rb
rails_admin-0.4.4 spec/integration/basic/bulk_action/rails_admin_basic_bulk_action_spec.rb
rails_admin-lbgraham-0.4.2 spec/integration/basic/bulk_action/rails_admin_basic_bulk_action_spec.rb
rails_admin-0.4.3 spec/integration/basic/bulk_action/rails_admin_basic_bulk_action_spec.rb
rails_admin-0.4.2 spec/integration/basic/bulk_action/rails_admin_basic_bulk_action_spec.rb
rails_admin-0.4.1 spec/integration/basic/bulk_action/rails_admin_basic_bulk_action_spec.rb
rails_admin-0.4.0 spec/integration/basic/bulk_action/rails_admin_basic_bulk_action_spec.rb