Commit d4f0542e authored by Felix Schäfer's avatar Felix Schäfer

Don't rely on ordering in news_test

The tests would fail because not all storage backends have a default
ordering
parent 6a265438
......@@ -17,7 +17,7 @@ class NewsTest < ActiveSupport::TestCase
fixtures :projects, :users, :roles, :members, :member_roles, :enabled_modules, :news
def valid_news
{ :title => 'Test news', :description => 'Lorem ipsum etc', :author => User.find(:first) }
{ :title => 'Test news', :description => 'Lorem ipsum etc', :author => users(:users_001) }
end
......@@ -28,7 +28,7 @@ class NewsTest < ActiveSupport::TestCase
def test_create_should_send_email_notification
ActionMailer::Base.deliveries.clear
Setting.notified_events = Setting.notified_events.dup << 'news_added'
news = Project.find(:first).news.new(valid_news)
news = projects(:projects_001).news.new(valid_news)
assert news.save
assert_equal 2, ActionMailer::Base.deliveries.size
......
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