Class: HasScopeClassMethods

Inherits:
ActiveSupport::TestCase
  • Object
show all
Defined in:
lib/vendor/plugins/inherited_resources/test/class_methods_test.rb

Instance Method Summary collapse

Instance Method Details

#test_scope_configuration_is_stored_as_hashesObject



128
129
130
131
132
133
134
135
136
# File 'lib/vendor/plugins/inherited_resources/test/class_methods_test.rb', line 128

def test_scope_configuration_is_stored_as_hashes
  config = SchoolsController.send(:scopes_configuration)

  assert config.key?(:by_city)
  assert config.key?(:featured)

  assert_equal config[:by_city], { :as => :by_city, :only => [], :except => [] }
  assert_equal config[:featured], { :as => :by_featured, :only => [ :index ], :except => [], :boolean => true }
end