Sha256: 37e2d35e7aeeffe811a9da00f135395c734fee5d14e7d8a3a66b8b727cc1ea1e

Contents?: true

Size: 967 Bytes

Versions: 58

Compression:

Stored size: 967 Bytes

Contents

require 'test_helper'

module Config
  class DeleteTest < MiniTest::Test
    def setup
      @config = ActiveScaffold::Config::Core.new :model_stub
      @default_link = @config.delete.link
    end

    def teardown
      @config.delete.link = @default_link
    end

    def test_link_defaults
      link = @config.delete.link
      refute link.page?
      refute link.popup?
      assert link.confirm?
      assert_equal 'destroy', link.action
      assert_equal 'Delete', link.label
      assert link.inline?
      blank = {}
      assert_equal blank, link.html_options
      assert_equal :delete, link.method
      assert_equal :member, link.type
      assert_equal :delete, link.crud_type
      assert_equal :delete_authorized?, link.security_method
    end

    def test_setting_link
      @config.delete.link = ActiveScaffold::DataStructures::ActionLink.new('update', :label => 'Monkeys')
      refute_equal @default_link, @config.delete.link
    end
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
active_scaffold-3.6.20 test/config/delete_test.rb
active_scaffold-3.6.19 test/config/delete_test.rb
active_scaffold-3.6.17 test/config/delete_test.rb
active_scaffold-3.6.15 test/config/delete_test.rb
active_scaffold-3.6.14 test/config/delete_test.rb
active_scaffold-3.6.13 test/config/delete_test.rb
active_scaffold-3.6.12 test/config/delete_test.rb
active_scaffold-3.6.11.1 test/config/delete_test.rb
active_scaffold-3.6.11 test/config/delete_test.rb
active_scaffold-3.6.10 test/config/delete_test.rb
active_scaffold-3.6.9 test/config/delete_test.rb
active_scaffold-3.6.8 test/config/delete_test.rb
active_scaffold-3.6.6 test/config/delete_test.rb
active_scaffold-3.6.5 test/config/delete_test.rb
active_scaffold-3.6.4.1 test/config/delete_test.rb
active_scaffold-3.6.4 test/config/delete_test.rb
active_scaffold-3.6.3 test/config/delete_test.rb
active_scaffold-3.6.2 test/config/delete_test.rb
active_scaffold-3.6.1 test/config/delete_test.rb
active_scaffold-3.6.0 test/config/delete_test.rb