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.1.19 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.1.18 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.1.17 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.1.15 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.1.14 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.1.13 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.1.12 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.1.11 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.1.10 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.1.9 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.1.8 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.1.7 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.1.6 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.1.5 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.1.4 test/bridges/active_scaffold_dependent_protect_test.rb
active_scaffold-3.1.3 test/bridges/active_scaffold_dependent_protect_test.rb