Class: StandardColumnTest

Inherits:
Test::Unit::TestCase
  • Object
show all
Defined in:
lib/six-updater-web/vendor/plugins/active_scaffold/test/data_structures/standard_column_test.rb

Instance Method Summary collapse

Instance Method Details

#setupObject



15
16
17
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/test/data_structures/standard_column_test.rb', line 15

def setup
  @standard_column = ActiveScaffold::DataStructures::Column.new(ModelStub.columns.first.name, ModelStub)
end

#test_searchingObject



30
31
32
33
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/test/data_structures/standard_column_test.rb', line 30

def test_searching
  assert @standard_column.searchable?
  assert_equal 'model_stubs.a', @standard_column.search_sql # check default
end

#test_sortingObject



24
25
26
27
28
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/test/data_structures/standard_column_test.rb', line 24

def test_sorting
  hash = {:sql => 'model_stubs.a'}
  assert @standard_column.sortable?
  assert_equal hash, @standard_column.sort # check default
end

#test_virtualityObject



19
20
21
22
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/test/data_structures/standard_column_test.rb', line 19

def test_virtuality
  assert @standard_column.column
  assert !@standard_column.virtual?
end