summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-11-16 12:22:39 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-11-16 12:22:39 +0000
commit73478a5789ea98de9625f503f02f0b5cc5caf850 (patch)
tree42b347a08d32afa19e76b9fc8c053ea427e31c7e
parentcf30b49e0ed6f32e1d4dac59d377b0273918cd5f (diff)
downloadredmine-73478a5789ea98de9625f503f02f0b5cc5caf850.tar.gz
redmine-73478a5789ea98de9625f503f02f0b5cc5caf850.zip
remove spaces inside {} of test/unit/news_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@20398 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--test/unit/news_test.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/unit/news_test.rb b/test/unit/news_test.rb
index a56c6e4ec..77664069e 100644
--- a/test/unit/news_test.rb
+++ b/test/unit/news_test.rb
@@ -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