Class: ODDB::View::Companies::TestCompanyList

Inherits:
Test::Unit::TestCase
  • Object
show all
Defined in:
test/test_view/companies/companylist.rb

Defined Under Namespace

Classes: StubModel, StubSession

Instance Method Summary (collapse)

Instance Method Details

- (Object) setup



62
63
64
# File 'test/test_view/companies/companylist.rb', line 62

def setup
  @session = StubSession.new
end

- (Object) test_no_double_sort



65
66
67
68
69
70
71
72
73
# File 'test/test_view/companies/companylist.rb', line 65

def test_no_double_sort
  comp1 = StubModel.new("foo")
  comp2 = StubModel.new("bar")
  comp3 = StubModel.new("fru")
  orig = [comp1, comp2, comp3]
  @session.event = :sort
  list = View::Companies::UnknownCompanyList.new(orig, @session)
  assert_equal(orig, list.model)
end