Commit e120f2aa authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

Fixes tests after fixtures changes.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4507 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent a8cf13e8
......@@ -46,9 +46,8 @@ class NewsTest < ActiveSupport::TestCase
end
def test_should_not_include_news_for_projects_with_news_disabled
# The projects_002 (OnlineStore) doesn't have the news module enabled, use that project for this test
project = projects(:projects_002)
assert ! project.enabled_modules.any?{ |em| em.name == 'news' }
EnabledModule.delete_all(["project_id = ? AND name = ?", 2, 'news'])
project = Project.find(2)
# Add a piece of news to the project
news = project.news.create(valid_news)
......@@ -58,8 +57,7 @@ class NewsTest < ActiveSupport::TestCase
end
def test_should_only_include_news_from_projects_visibly_to_the_user
# users_001 has no memberships so can only get news from public project
assert News.latest(users(:users_001)).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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment