diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2016-07-20 00:51:10 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-20 00:51:10 -0300 |
commit | 82b04fc6093525b8d958805cd8c8286bc62accbf (patch) | |
tree | 224ae7d327f0d8fa96e7eea3b01ebe7a5f86fa03 /activerecord/test | |
parent | 0f96d01758c24def396f485f53471e34b87321e9 (diff) | |
parent | 38cd2aae43d8081785a79a81e4fef200a616e4ca (diff) | |
download | rails-82b04fc6093525b8d958805cd8c8286bc62accbf.tar.gz rails-82b04fc6093525b8d958805cd8c8286bc62accbf.tar.bz2 rails-82b04fc6093525b8d958805cd8c8286bc62accbf.zip |
Merge pull request #25868 from kamipo/fix_payload_class_name_to_spec_name
Fix `payload[:class_name]` to `payload[:spec_name]`
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/connection_pool_test.rb | 4 | ||||
-rw-r--r-- | activerecord/test/cases/fixtures_test.rb | 4 | ||||
-rw-r--r-- | activerecord/test/cases/query_cache_test.rb | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/activerecord/test/cases/connection_pool_test.rb b/activerecord/test/cases/connection_pool_test.rb index 2bdabaee62..bbcb42d58e 100644 --- a/activerecord/test/cases/connection_pool_test.rb +++ b/activerecord/test/cases/connection_pool_test.rb @@ -347,8 +347,8 @@ module ActiveRecord payloads << payload end ActiveRecord::Base.establish_connection :arunit - assert_equal [:class_name, :config, :connection_id], payloads[0].keys.sort - assert_equal 'primary', payloads[0][:class_name] + assert_equal [:config, :connection_id, :spec_name], payloads[0].keys.sort + assert_equal 'primary', payloads[0][:spec_name] ensure ActiveSupport::Notifications.unsubscribe(subscription) if subscription end diff --git a/activerecord/test/cases/fixtures_test.rb b/activerecord/test/cases/fixtures_test.rb index a06aa4b247..df53bbf950 100644 --- a/activerecord/test/cases/fixtures_test.rb +++ b/activerecord/test/cases/fixtures_test.rb @@ -650,10 +650,10 @@ class TransactionalFixturesOnConnectionNotification < ActiveRecord::TestCase private def fire_connection_notification(connection) - ActiveRecord::Base.connection_handler.stubs(:retrieve_connection).with(Book).returns(connection) + ActiveRecord::Base.connection_handler.stubs(:retrieve_connection).with('book').returns(connection) message_bus = ActiveSupport::Notifications.instrumenter payload = { - class_name: 'Book', + spec_name: 'book', config: nil, connection_id: connection.object_id } diff --git a/activerecord/test/cases/query_cache_test.rb b/activerecord/test/cases/query_cache_test.rb index 03ec063671..085636553e 100644 --- a/activerecord/test/cases/query_cache_test.rb +++ b/activerecord/test/cases/query_cache_test.rb @@ -6,6 +6,8 @@ require 'models/post' require 'rack' class QueryCacheTest < ActiveRecord::TestCase + self.use_transactional_tests = false + fixtures :tasks, :topics, :categories, :posts, :categories_posts teardown do |