diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-12-12 19:43:15 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-12-12 19:43:15 +0000 |
commit | e120f2aab4b1e8471c6bcfeb8984022ee5a254e1 (patch) | |
tree | 79a56d04661899a71f1dbbd556a67c8b4852dd4c /test | |
parent | a8cf13e8c8fb60d001ce44defda4988305f8d865 (diff) | |
download | redmine-e120f2aab4b1e8471c6bcfeb8984022ee5a254e1.tar.gz redmine-e120f2aab4b1e8471c6bcfeb8984022ee5a254e1.zip |
Fixes tests after fixtures changes.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4507 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/news_test.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/unit/news_test.rb b/test/unit/news_test.rb index e9d3880e5..b1b608dfc 100644 --- a/test/unit/news_test.rb +++ b/test/unit/news_test.rb @@ -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 |