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-3.2.14 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.2.13 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.2.12 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.2.11 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.2.10 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.2.9 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.2.8 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.2.7 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.2.6 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.2.5 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.2.4 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.2.3 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-sequel-0.5.1 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-sequel-0.5.0 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.2.2 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.2.1 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-sequel-0.4.0 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-sequel-0.3.0 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.2.0 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.1.20 test/bridges/active_scaffold_dependent_protect_test.rb