]> source.dussan.org Git - redmine.git/commitdiff
remove spaces inside {} of test/unit/news_test.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 16 Nov 2020 12:22:39 +0000 (12:22 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 16 Nov 2020 12:22:39 +0000 (12:22 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@20398 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/news_test.rb

index a56c6e4ece8a2769ce74fccf8625a7a7694f20f5..77664069eba62a79b9408fbf65df26b2d875b564 100644 (file)
@@ -23,7 +23,7 @@ class NewsTest < ActiveSupport::TestCase
   fixtures :projects, :users, :email_addresses, :roles, :members, :member_roles, :enabled_modules, :news
 
   def valid_news
-    { :title => 'Test news', :description => 'Lorem ipsum etc', :author => User.first }
+    {:title => 'Test news', :description => 'Lorem ipsum etc', :author => User.first}
   end
 
   def setup
@@ -42,10 +42,10 @@ class NewsTest < ActiveSupport::TestCase
 
   def test_should_include_news_for_projects_with_news_enabled
     project = projects(:projects_001)
-    assert project.enabled_modules.any?{ |em| em.name == 'news' }
+    assert project.enabled_modules.any?{|em| em.name == 'news'}
 
     # News.latest should return news from projects_001
-    assert News.latest.any? { |news| news.project == project }
+    assert News.latest.any? {|news| news.project == project}
   end
 
   def test_should_not_include_news_for_projects_with_news_disabled
@@ -60,19 +60,19 @@ class NewsTest < ActiveSupport::TestCase
   end
 
   def test_should_only_include_news_from_projects_visibly_to_the_user
-    assert News.latest(User.anonymous).all? { |news| news.project.is_public? }
+    assert News.latest(User.anonymous).all? {|news| news.project.is_public?}
   end
 
   def test_should_limit_the_amount_of_returned_news
     # Make sure we have a bunch of news stories
-    10.times { projects(:projects_001).news.create(valid_news) }
+    10.times {projects(:projects_001).news.create(valid_news)}
     assert_equal 2, News.latest(users(:users_002), 2).size
     assert_equal 6, News.latest(users(:users_002), 6).size
   end
 
   def test_should_return_5_news_stories_by_default
     # Make sure we have a bunch of news stories
-    10.times { projects(:projects_001).news.create(valid_news) }
+    10.times {projects(:projects_001).news.create(valid_news)}
     assert_equal 5, News.latest(users(:users_004)).size
   end