mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix "nonexistent" typo in tests
This commit is contained in:
parent
45c6cab2ab
commit
3b43d1d822
7 changed files with 11 additions and 11 deletions
|
@ -494,7 +494,7 @@ class CookiesTest < ActionController::TestCase
|
|||
assert_nil @response.cookies["user_id"]
|
||||
end
|
||||
|
||||
def test_accessing_nonexistant_signed_cookie_should_not_raise_an_invalid_signature
|
||||
def test_accessing_nonexistent_signed_cookie_should_not_raise_an_invalid_signature
|
||||
get :set_signed_cookie
|
||||
assert_nil @controller.send(:cookies).signed[:non_existant_attribute]
|
||||
end
|
||||
|
@ -612,7 +612,7 @@ class CookiesTest < ActionController::TestCase
|
|||
assert_nil @response.cookies["foo"]
|
||||
end
|
||||
|
||||
def test_accessing_nonexistant_encrypted_cookie_should_not_raise_invalid_message
|
||||
def test_accessing_nonexistent_encrypted_cookie_should_not_raise_invalid_message
|
||||
get :set_encrypted_cookie
|
||||
assert_nil @controller.send(:cookies).encrypted[:non_existant_attribute]
|
||||
end
|
||||
|
|
|
@ -503,8 +503,8 @@ class EagerAssociationTest < ActiveRecord::TestCase
|
|||
end
|
||||
|
||||
def test_eager_with_has_many_through_an_sti_join_model_with_conditions_on_both
|
||||
author = Author.all.merge!(:includes => :special_nonexistant_post_comments, :order => 'authors.id').first
|
||||
assert_equal [], author.special_nonexistant_post_comments
|
||||
author = Author.all.merge!(:includes => :special_nonexistent_post_comments, :order => 'authors.id').first
|
||||
assert_equal [], author.special_nonexistent_post_comments
|
||||
end
|
||||
|
||||
def test_eager_with_has_many_through_join_model_with_conditions
|
||||
|
|
|
@ -102,7 +102,7 @@ class InnerJoinAssociationTest < ActiveRecord::TestCase
|
|||
|
||||
def test_find_with_conditions_on_reflection
|
||||
assert !posts(:welcome).comments.empty?
|
||||
assert Post.joins(:nonexistant_comments).where(:id => posts(:welcome).id).empty? # [sic!]
|
||||
assert Post.joins(:nonexistent_comments).where(:id => posts(:welcome).id).empty? # [sic!]
|
||||
end
|
||||
|
||||
def test_find_with_conditions_on_through_reflection
|
||||
|
|
|
@ -444,7 +444,7 @@ class AssociationsJoinModelTest < ActiveRecord::TestCase
|
|||
def test_has_many_through_uses_conditions_specified_on_the_has_many_association
|
||||
author = Author.first
|
||||
assert author.comments.present?
|
||||
assert author.nonexistant_comments.blank?
|
||||
assert author.nonexistent_comments.blank?
|
||||
end
|
||||
|
||||
def test_has_many_through_uses_correct_attributes
|
||||
|
|
|
@ -50,9 +50,9 @@ class Author < ActiveRecord::Base
|
|||
has_many :sti_posts, :class_name => 'StiPost'
|
||||
has_many :sti_post_comments, :through => :sti_posts, :source => :comments
|
||||
|
||||
has_many :special_nonexistant_posts, -> { where("posts.body = 'nonexistant'") }, :class_name => "SpecialPost"
|
||||
has_many :special_nonexistant_post_comments, -> { where('comments.post_id' => 0) }, :through => :special_nonexistant_posts, :source => :comments
|
||||
has_many :nonexistant_comments, :through => :posts
|
||||
has_many :special_nonexistent_posts, -> { where("posts.body = 'nonexistent'") }, :class_name => "SpecialPost"
|
||||
has_many :special_nonexistent_post_comments, -> { where('comments.post_id' => 0) }, :through => :special_nonexistent_posts, :source => :comments
|
||||
has_many :nonexistent_comments, :through => :posts
|
||||
|
||||
has_many :hello_posts, -> { where "posts.body = 'hello'" }, :class_name => "Post"
|
||||
has_many :hello_post_comments, :through => :hello_posts, :source => :comments
|
||||
|
|
|
@ -80,7 +80,7 @@ class Post < ActiveRecord::Base
|
|||
has_one :very_special_comment_with_post, -> { includes(:post) }, :class_name => "VerySpecialComment"
|
||||
has_one :very_special_comment_with_post_with_joins, -> { joins(:post).order('posts.id') }, class_name: "VerySpecialComment"
|
||||
has_many :special_comments
|
||||
has_many :nonexistant_comments, -> { where 'comments.id < 0' }, :class_name => 'Comment'
|
||||
has_many :nonexistent_comments, -> { where 'comments.id < 0' }, :class_name => 'Comment'
|
||||
|
||||
has_many :special_comments_ratings, :through => :special_comments, :source => :ratings
|
||||
has_many :special_comments_ratings_taggings, :through => :special_comments_ratings, :source => :taggings
|
||||
|
|
|
@ -1158,7 +1158,7 @@ module ApplicationTests
|
|||
app_file 'config/environments/development.rb', <<-RUBY
|
||||
|
||||
Rails.application.configure do
|
||||
config.paths.add 'config/database', with: 'config/nonexistant.yml'
|
||||
config.paths.add 'config/database', with: 'config/nonexistent.yml'
|
||||
config.paths['config/database'] << 'config/database.yml'
|
||||
end
|
||||
RUBY
|
||||
|
|
Loading…
Reference in a new issue