Sha256: 8603dc91e3a3757654a1258b64366dfd5204d62ccb77a4cfec153c424f04c2fa

Contents?: true

Size: 707 Bytes

Versions: 2

Compression:

Stored size: 707 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
      page.driver.post(bulk_action_path(:bulk_action => 'bulk_delete', :model_name => "player", :bulk_ids => @players.map(&:id)))
      @players.each { |player| should have_content(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

2 entries across 2 versions & 1 rubygems

Version Path
rails_admin-0.3.0 spec/integration/basic/bulk_action/rails_admin_basic_bulk_action_spec.rb
rails_admin-0.2.0 spec/integration/basic/bulk_action/rails_admin_basic_bulk_action_spec.rb