Sha256: c2fa5163d98b6148f27cd0c976d693f69db2b48c80a00d2767a0739c862f0382

Contents?: true

Size: 514 Bytes

Versions: 29

Compression:

Stored size: 514 Bytes

Contents

require 'cases/sqlserver_helper'
require 'models/order'

class TableNameTestSqlserver < ActiveRecord::TestCase
  
  self.use_transactional_fixtures = false
  
  def setup
    Order.table_name = '[orders]'
    Order.reset_column_information
  end
  
  should 'load columns with escaped table name for model' do
    assert_equal 4, Order.columns.length
  end
  
  should 'not re-escape table name if it is escaped already for SQL queries' do
    assert_sql(/SELECT \* FROM \[orders\]/) { Order.all }
  end
  
  
end

Version data entries

29 entries across 29 versions & 7 rubygems

Version Path
aq1018-2000-2008-adapter-0.0.1 test/cases/table_name_test_sqlserver.rb
aq1018-sqlserver-2000-2008-adpater-0.0.2 test/cases/table_name_test_sqlserver.rb
artpop-2000-2005-adapter-2.2.15 test/cases/table_name_test_sqlserver.rb
rails-sqlserver-2000-2005-adapter-2.2.1 test/cases/table_name_test_sqlserver.rb
rails-sqlserver-2000-2005-adapter-2.2.10 test/cases/table_name_test_sqlserver.rb
rails-sqlserver-2000-2005-adapter-2.2.11 test/cases/table_name_test_sqlserver.rb
rails-sqlserver-2000-2005-adapter-2.2.12 test/cases/table_name_test_sqlserver.rb
rails-sqlserver-2000-2005-adapter-2.2.13 test/cases/table_name_test_sqlserver.rb
rails-sqlserver-2000-2005-adapter-2.2.14 test/cases/table_name_test_sqlserver.rb
rails-sqlserver-2000-2005-adapter-2.2.15 test/cases/table_name_test_sqlserver.rb
rails-sqlserver-2000-2005-adapter-2.2.16 test/cases/table_name_test_sqlserver.rb
rails-sqlserver-2000-2005-adapter-2.2.17 test/cases/table_name_test_sqlserver.rb
rails-sqlserver-2000-2005-adapter-2.2.18 test/cases/table_name_test_sqlserver.rb
rails-sqlserver-2000-2005-adapter-2.2.19 test/cases/table_name_test_sqlserver.rb
rails-sqlserver-2000-2005-adapter-2.2.2 test/cases/table_name_test_sqlserver.rb
rails-sqlserver-2000-2005-adapter-2.2.21 test/cases/table_name_test_sqlserver.rb
rails-sqlserver-2000-2005-adapter-2.2.3 test/cases/table_name_test_sqlserver.rb
rails-sqlserver-2000-2005-adapter-2.2.4 test/cases/table_name_test_sqlserver.rb
rails-sqlserver-2000-2005-adapter-2.2.5 test/cases/table_name_test_sqlserver.rb
rails-sqlserver-2000-2005-adapter-2.2.6 test/cases/table_name_test_sqlserver.rb