fix tests
This commit is contained in:
@@ -110,7 +110,7 @@ class ForumTopicTest < ActiveSupport::TestCase
|
||||
should "prune the string if it gets too long" do
|
||||
array = (1..1_000).to_a.map(&:to_s).in_groups_of(2)
|
||||
result = @topic.mark_as_read(array)
|
||||
assert_operator result.size, :<, 500
|
||||
assert_operator result.size, :<=, 500
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ class SavedSearchTest < ActiveSupport::TestCase
|
||||
|
||||
should "update the bitpref on the user" do
|
||||
@user.reload
|
||||
assert(@user.has_saved_searchs?, "should have saved_searches bitpref set")
|
||||
assert(@user.has_saved_searches?, "should have saved_searches bitpref set")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -34,7 +34,7 @@ class SavedSearchTest < ActiveSupport::TestCase
|
||||
end
|
||||
|
||||
should "not be able to create another saved search" do
|
||||
assert_equal(["User can only have up to 0 saved searches"], @saved_search.errors.full_messages)
|
||||
assert_equal(["You can only have up to 0 saved searches"], @saved_search.errors.full_messages)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -175,10 +175,9 @@ class UploadTest < ActiveSupport::TestCase
|
||||
|
||||
should "increment the uploaders post_upload_count" do
|
||||
@upload = FactoryGirl.create(:source_upload)
|
||||
assert_difference("CurrentUser.post_upload_count", 1) do
|
||||
assert_difference("CurrentUser.user.post_upload_count", 1) do
|
||||
@upload.process!
|
||||
puts @upload.errors.full_messages
|
||||
CurrentUser.reload
|
||||
CurrentUser.user.reload
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user