Fix #2894: Use [[:space:]] instead of \s in regexes.
This commit is contained in:
@@ -298,5 +298,10 @@ class CommentTest < ActiveSupport::TestCase
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "during validation" do
|
||||
subject { FactoryBot.build(:comment) }
|
||||
should_not allow_value(" ").for(:body)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -210,5 +210,15 @@ class DmailTest < ActiveSupport::TestCase
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "during validation" do
|
||||
subject { FactoryBot.build(:dmail) }
|
||||
|
||||
should_not allow_value(" ").for(:title)
|
||||
should_not allow_value(" ").for(:body)
|
||||
should_not allow_value(nil).for(:to)
|
||||
should_not allow_value(nil).for(:from)
|
||||
should_not allow_value(nil).for(:owner)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -74,7 +74,7 @@ class TagAliasTest < ActiveSupport::TestCase
|
||||
ss = FactoryBot.create(:saved_search, :query => "123 ... 456", :user => CurrentUser.user)
|
||||
ta = FactoryBot.create(:tag_alias, :antecedent_name => "...", :consequent_name => "bbb")
|
||||
ss.reload
|
||||
assert_equal(%w(123 456 bbb), ss.query.scan(/\S+/).sort)
|
||||
assert_equal(%w(123 456 bbb), ss.query.split.sort)
|
||||
end
|
||||
|
||||
should "update any affected posts when saved" do
|
||||
|
||||
Reference in New Issue
Block a user