Skip to content

Commit

Permalink
Restore fixtures :author_addresses
Browse files Browse the repository at this point in the history
This change reverted in eac6f36 but it is needed for data integrity.
See #25328.
  • Loading branch information
kamipo committed Apr 27, 2017
1 parent 1583e26 commit 86e74a0
Show file tree
Hide file tree
Showing 21 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion activerecord/test/cases/associations/callbacks_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
require "models/company"

class AssociationCallbacksTest < ActiveRecord::TestCase
fixtures :posts, :authors, :projects, :developers
fixtures :posts, :authors, :author_addresses, :projects, :developers

def setup
@david = authors(:david)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
require "models/edge"

class CascadedEagerLoadingTest < ActiveRecord::TestCase
fixtures :authors, :mixins, :companies, :posts, :topics, :accounts, :comments,
fixtures :authors, :author_addresses, :mixins, :companies, :posts, :topics, :accounts, :comments,
:categorizations, :people, :categories, :edges, :vertices

def test_eager_association_loading_with_cascaded_two_levels
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
require "models/interest"

class HasManyAssociationsTestForReorderWithJoinDependency < ActiveRecord::TestCase
fixtures :authors, :posts, :comments
fixtures :authors, :author_addresses, :posts, :comments

def test_should_generate_valid_sql
author = authors(:david)
Expand All @@ -51,7 +51,7 @@ def test_should_generate_valid_sql
end

class HasManyAssociationsTestPrimaryKeys < ActiveRecord::TestCase
fixtures :authors, :essays, :subscribers, :subscriptions, :people
fixtures :authors, :author_addresses, :essays, :subscribers, :subscriptions, :people

def test_custom_primary_key_on_new_record_should_fetch_with_query
subscriber = Subscriber.new(nick: "webster132")
Expand Down Expand Up @@ -100,7 +100,7 @@ def test_blank_custom_primary_key_on_new_record_should_not_run_queries

class HasManyAssociationsTest < ActiveRecord::TestCase
fixtures :accounts, :categories, :companies, :developers, :projects,
:developers_projects, :topics, :authors, :comments,
:developers_projects, :topics, :authors, :author_addresses, :comments,
:posts, :readers, :taggings, :cars, :jobs, :tags,
:categorizations, :zines, :interests

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

class HasOneThroughAssociationsTest < ActiveRecord::TestCase
fixtures :member_types, :members, :clubs, :memberships, :sponsors, :organizations, :minivans,
:dashboards, :speedometers, :authors, :posts, :comments, :categories, :essays, :owners
:dashboards, :speedometers, :authors, :author_addresses, :posts, :comments, :categories, :essays, :owners

def setup
@member = members(:groucho)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
require "models/tag"

class InnerJoinAssociationTest < ActiveRecord::TestCase
fixtures :authors, :essays, :posts, :comments, :categories, :categories_posts, :categorizations,
fixtures :authors, :author_addresses, :essays, :posts, :comments, :categories, :categories_posts, :categorizations,
:taggings, :tags

def test_construct_finder_sql_applies_aliases_tables_on_association_conditions
Expand Down
2 changes: 1 addition & 1 deletion activerecord/test/cases/associations/join_model_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class AssociationsJoinModelTest < ActiveRecord::TestCase
self.use_transactional_tests = false unless supports_savepoints?

fixtures :posts, :authors, :categories, :categorizations, :comments, :tags, :taggings, :author_favorites, :vertices, :items, :books,
fixtures :posts, :authors, :author_addresses, :categories, :categorizations, :comments, :tags, :taggings, :author_favorites, :vertices, :items, :books,
# Reload edges table from fixtures as otherwise repeated test was failing
:edges

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
require "models/person"

class LeftOuterJoinAssociationTest < ActiveRecord::TestCase
fixtures :authors, :essays, :posts, :comments, :categorizations, :people
fixtures :authors, :author_addresses, :essays, :posts, :comments, :categorizations, :people

def test_construct_finder_sql_applies_aliases_tables_on_association_conditions
result = Author.left_outer_joins(:thinking_posts, :welcome_posts).to_a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
require "models/essay"

class NestedThroughAssociationsTest < ActiveRecord::TestCase
fixtures :authors, :books, :posts, :subscriptions, :subscribers, :tags, :taggings,
fixtures :authors, :author_addresses, :books, :posts, :subscriptions, :subscribers, :tags, :taggings,
:people, :readers, :references, :jobs, :ratings, :comments, :members, :member_details,
:member_types, :sponsors, :clubs, :organizations, :categories, :categories_posts,
:categorizations, :memberships, :essays
Expand Down
4 changes: 2 additions & 2 deletions activerecord/test/cases/associations_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

class AssociationsTest < ActiveRecord::TestCase
fixtures :accounts, :companies, :developers, :projects, :developers_projects,
:computers, :people, :readers, :authors, :author_favorites
:computers, :people, :readers, :authors, :author_addresses, :author_favorites

def test_eager_loading_should_not_change_count_of_children
liquid = Liquid.create(name: "salty")
Expand Down Expand Up @@ -111,7 +111,7 @@ def test_association_with_references
end

class AssociationProxyTest < ActiveRecord::TestCase
fixtures :authors, :posts, :categorizations, :categories, :developers, :projects, :developers_projects
fixtures :authors, :author_addresses, :posts, :categorizations, :categories, :developers, :projects, :developers_projects

def test_push_does_not_load_target
david = authors(:david)
Expand Down
2 changes: 1 addition & 1 deletion activerecord/test/cases/base_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def setup
end

class BasicsTest < ActiveRecord::TestCase
fixtures :topics, :companies, :developers, :projects, :computers, :accounts, :minimalistics, "warehouse-things", :authors, :categorizations, :categories, :posts
fixtures :topics, :companies, :developers, :projects, :computers, :accounts, :minimalistics, "warehouse-things", :authors, :author_addresses, :categorizations, :categories, :posts

def test_column_names_are_escaped
conn = ActiveRecord::Base.connection
Expand Down
2 changes: 1 addition & 1 deletion activerecord/test/cases/bind_parameter_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
ActiveRecord::Base.connection.prepared_statements
module ActiveRecord
class BindParameterTest < ActiveRecord::TestCase
fixtures :topics, :authors, :posts
fixtures :topics, :authors, :author_addresses, :posts

class LogListener
attr_accessor :calls
Expand Down
2 changes: 1 addition & 1 deletion activerecord/test/cases/fixtures_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ def test_all_there

class FasterFixturesTest < ActiveRecord::TestCase
self.use_transactional_tests = false
fixtures :categories, :authors
fixtures :categories, :authors, :author_addresses

def load_extra_fixture(name)
fixture = create_fixtures(name).first
Expand Down
2 changes: 1 addition & 1 deletion activerecord/test/cases/json_serialization_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def test_serializable_hash_should_not_modify_options_in_argument
end

class DatabaseConnectedJsonEncodingTest < ActiveRecord::TestCase
fixtures :authors, :posts, :comments, :tags, :taggings
fixtures :authors, :author_addresses, :posts, :comments, :tags, :taggings

include JsonSerializationHelpers

Expand Down
2 changes: 1 addition & 1 deletion activerecord/test/cases/readonly_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
require "models/ship"

class ReadOnlyTest < ActiveRecord::TestCase
fixtures :authors, :posts, :comments, :developers, :projects, :developers_projects, :people, :readers
fixtures :authors, :author_addresses, :posts, :comments, :developers, :projects, :developers_projects, :people, :readers

def test_cant_save_readonly_record
dev = Developer.find(1)
Expand Down
4 changes: 2 additions & 2 deletions activerecord/test/cases/relation/merging_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
require "models/rating"

class RelationMergingTest < ActiveRecord::TestCase
fixtures :developers, :comments, :authors, :posts
fixtures :developers, :comments, :authors, :author_addresses, :posts

def test_relation_merging
devs = Developer.where("salary >= 80000").merge(Developer.limit(2)).merge(Developer.order("id ASC").where("id < 3"))
Expand Down Expand Up @@ -114,7 +114,7 @@ def test_merging_with_from_clause
end

class MergingDifferentRelationsTest < ActiveRecord::TestCase
fixtures :posts, :authors, :developers
fixtures :posts, :authors, :author_addresses, :developers

test "merging where relations" do
hello_by_bob = Post.where(body: "hello").joins(:author).
Expand Down
2 changes: 1 addition & 1 deletion activerecord/test/cases/relation/where_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

module ActiveRecord
class WhereTest < ActiveRecord::TestCase
fixtures :posts, :edges, :authors, :binaries, :essays, :cars, :treasures, :price_estimates
fixtures :posts, :edges, :authors, :author_addresses, :binaries, :essays, :cars, :treasures, :price_estimates

def test_where_copies_bind_params
author = authors(:david)
Expand Down
2 changes: 1 addition & 1 deletion activerecord/test/cases/relation_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

module ActiveRecord
class RelationTest < ActiveRecord::TestCase
fixtures :posts, :comments, :authors
fixtures :posts, :comments, :authors, :author_addresses

FakeKlass = Struct.new(:table_name, :name) do
extend ActiveRecord::Delegation::DelegateCache
Expand Down
2 changes: 1 addition & 1 deletion activerecord/test/cases/relations_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
require "models/edge"

class RelationTest < ActiveRecord::TestCase
fixtures :authors, :topics, :entrants, :developers, :companies, :developers_projects, :accounts, :categories, :categorizations, :posts, :comments,
fixtures :authors, :author_addresses, :topics, :entrants, :developers, :companies, :developers_projects, :accounts, :categories, :categorizations, :posts, :comments,
:tags, :taggings, :cars, :minivans

class TopicWithCallbacks < ActiveRecord::Base
Expand Down
4 changes: 2 additions & 2 deletions activerecord/test/cases/scoping/relation_scoping_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
require "models/reference"

class RelationScopingTest < ActiveRecord::TestCase
fixtures :authors, :developers, :projects, :comments, :posts, :developers_projects
fixtures :authors, :author_addresses, :developers, :projects, :comments, :posts, :developers_projects

setup do
developers(:david)
Expand Down Expand Up @@ -238,7 +238,7 @@ def test_circular_joins_with_current_scope_does_not_crash
end

class NestedRelationScopingTest < ActiveRecord::TestCase
fixtures :authors, :developers, :projects, :comments, :posts
fixtures :authors, :author_addresses, :developers, :projects, :comments, :posts

def test_merge_options
Developer.where("salary = 80000").scoping do
Expand Down
2 changes: 1 addition & 1 deletion activerecord/test/cases/transactions_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

class TransactionTest < ActiveRecord::TestCase
self.use_transactional_tests = false
fixtures :topics, :developers, :authors, :posts
fixtures :topics, :developers, :authors, :author_addresses, :posts

def setup
@first, @second = Topic.find(1, 2).sort_by(&:id)
Expand Down
2 changes: 1 addition & 1 deletion activerecord/test/cases/yaml_serialization_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
require "models/author"

class YamlSerializationTest < ActiveRecord::TestCase
fixtures :topics, :authors, :posts
fixtures :topics, :authors, :author_addresses, :posts

def test_to_yaml_with_time_with_zone_should_not_raise_exception
with_timezone_config aware_attributes: true, zone: "Pacific Time (US & Canada)" do
Expand Down

0 comments on commit 86e74a0

Please sign in to comment.