Sha256: 7e895d733ac4740e5e18a8588f22a59da7e4becefb4c52034d13df93b23b0155

Contents?: true

Size: 1.2 KB

Versions: 56

Compression:

Stored size: 1.2 KB

Contents

require 'test/unit'
require File.join(File.dirname(__FILE__), 'company')

class ActiveScaffoldDependentProtectTest < Test::Unit::TestCase
  def test_destroy_protected_with_companies
    protected_firm = Company.new(:with_companies)
    assert !protected_firm.send(:authorized_for_delete?)
  end
  
  def test_destroy_protected_with_company
    protected_firm = Company.new(:with_company)
    assert !protected_firm.send(:authorized_for_delete?)
  end
  
  def test_destroy_protected_with_main_company
    protected_firm = Company.new(:with_main_company)
    assert !protected_firm.send(:authorized_for_delete?)
  end
  
  def test_destroy_protected_without_companies
    protected_firm_without_companies = Company.new(:without_companies)
    assert protected_firm_without_companies.send(:authorized_for_delete?)
  end
  
  def test_destroy_protected_without_company
    protected_firm_without_company = Company.new(:without_company)
    assert protected_firm_without_company.send(:authorized_for_delete?)
  end
  
  def test_destroy_protected_without_main_company
    protected_firm_without_main_company = Company.new(:without_main_company)
    assert protected_firm_without_main_company.send(:authorized_for_delete?)
  end
end

Version data entries

56 entries across 56 versions & 3 rubygems

Version Path
active_scaffold-sequel-0.8.0 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-sequel-0.7.1 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-sequel-0.7.0 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-sequel-0.6.2 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-sequel-0.6.1 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-sequel-0.6.0 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.3.2 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.3.1 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.3.0 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.2.20 test/bridges/active_scaffold_dependent_protect_test.rb
brisk-bills-0.8.2 vendor/plugins/active_scaffold/test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.3.0.rc3 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.3.0.rc2 test/bridges/active_scaffold_dependent_protect_test.rb
brisk-bills-0.8.1 vendor/plugins/active_scaffold/test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.2.19 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.2.18 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.3.0.rc test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.2.17 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.2.16 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.2.15 test/bridges/active_scaffold_dependent_protect_test.rb