aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/adapters/mysql2/connection_test.rb
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2016-08-06 19:44:11 +0200
committerXavier Noria <fxn@hashref.com>2016-08-06 19:44:11 +0200
commit411ccbdab2608c62aabdb320d52cb02d446bb39c (patch)
tree05671553ac2a23dd1db4d11949c1ac43c3dd1367 /activerecord/test/cases/adapters/mysql2/connection_test.rb
parent60b67d76dc1d98e4269aac7705e9d8323eb42942 (diff)
downloadrails-411ccbdab2608c62aabdb320d52cb02d446bb39c.tar.gz
rails-411ccbdab2608c62aabdb320d52cb02d446bb39c.tar.bz2
rails-411ccbdab2608c62aabdb320d52cb02d446bb39c.zip
remove redundant curlies from hash arguments
Diffstat (limited to 'activerecord/test/cases/adapters/mysql2/connection_test.rb')
-rw-r--r--activerecord/test/cases/adapters/mysql2/connection_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/test/cases/adapters/mysql2/connection_test.rb b/activerecord/test/cases/adapters/mysql2/connection_test.rb
index b6ed20abaa..475269d5cb 100644
--- a/activerecord/test/cases/adapters/mysql2/connection_test.rb
+++ b/activerecord/test/cases/adapters/mysql2/connection_test.rb
@@ -100,21 +100,21 @@ class Mysql2ConnectionTest < ActiveRecord::Mysql2TestCase
def test_passing_arbitary_flags_to_adapter
run_without_connection do |orig_connection|
- ActiveRecord::Base.establish_connection(orig_connection.merge({flags: Mysql2::Client::COMPRESS}))
+ ActiveRecord::Base.establish_connection(orig_connection.merge(flags: Mysql2::Client::COMPRESS))
assert_equal (Mysql2::Client::COMPRESS | Mysql2::Client::FOUND_ROWS), ActiveRecord::Base.connection.raw_connection.query_options[:flags]
end
end
def test_passing_flags_by_array_to_adapter
run_without_connection do |orig_connection|
- ActiveRecord::Base.establish_connection(orig_connection.merge({flags: ["COMPRESS"] }))
+ ActiveRecord::Base.establish_connection(orig_connection.merge(flags: ["COMPRESS"]))
assert_equal ["COMPRESS", "FOUND_ROWS"], ActiveRecord::Base.connection.raw_connection.query_options[:flags]
end
end
def test_mysql_set_session_variable
run_without_connection do |orig_connection|
- ActiveRecord::Base.establish_connection(orig_connection.deep_merge({variables: {default_week_format: 3}}))
+ ActiveRecord::Base.establish_connection(orig_connection.deep_merge(variables: {default_week_format: 3}))
session_mode = ActiveRecord::Base.connection.exec_query "SELECT @@SESSION.DEFAULT_WEEK_FORMAT"
assert_equal 3, session_mode.rows.first.first.to_i
end
@@ -122,7 +122,7 @@ class Mysql2ConnectionTest < ActiveRecord::Mysql2TestCase
def test_mysql_set_session_variable_to_default
run_without_connection do |orig_connection|
- ActiveRecord::Base.establish_connection(orig_connection.deep_merge({variables: {default_week_format: :default}}))
+ ActiveRecord::Base.establish_connection(orig_connection.deep_merge(variables: {default_week_format: :default}))
global_mode = ActiveRecord::Base.connection.exec_query "SELECT @@GLOBAL.DEFAULT_WEEK_FORMAT"
session_mode = ActiveRecord::Base.connection.exec_query "SELECT @@SESSION.DEFAULT_WEEK_FORMAT"
assert_equal global_mode.rows, session_mode.rows