rails-sqlserver / activerecord-sqlserver-adapter

SQL Server Adapter For Rails
MIT License
968 stars 558 forks source link

Fix tests to handle companies status column #1060

Closed aidanharan closed 1 year ago

aidanharan commented 1 year ago

Fix the following tests to accommodate the companies.status column that was added to the tests in Rails 7.0.5.

See https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/actions/runs/5122100848/jobs/9210694895?pr=1057

CalculationsTest#test_select_avg_with_joins_and_group_by_as_virtual_attribute_with_ar_coerced:
ActiveRecord::StatementInvalid: TinyTds::Error: Column 'companies.status' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.

CalculationsTest#test_select_avg_with_joins_and_group_by_as_virtual_attribute_with_sql_coerced:
ActiveRecord::StatementInvalid: TinyTds::Error: Column 'companies.status' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.