From aa2b0a8709704b21c97aff1b13ee68c8b1075b8d Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Fri, 13 May 2011 11:26:06 -0700 Subject: [PATCH] [#123 #407] Deferred Journal#visible tests --- test/unit/journal_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/unit/journal_test.rb b/test/unit/journal_test.rb index ab4e3761..579191a0 100644 --- a/test/unit/journal_test.rb +++ b/test/unit/journal_test.rb @@ -51,7 +51,7 @@ class JournalTest < ActiveSupport::TestCase assert_equal 1, ActionMailer::Base.deliveries.size end - def test_visible_scope_for_anonymous + should_eventually "test_visible_scope_for_anonymous" do # Anonymous user should see issues of public projects only journals = Journal.visible(User.anonymous).all assert journals.any? @@ -61,8 +61,8 @@ class JournalTest < ActiveSupport::TestCase journals = Journal.visible(User.anonymous).all assert journals.empty? end - - def test_visible_scope_for_user + + should_eventually "test_visible_scope_for_user" do user = User.find(9) assert user.projects.empty? # Non member user should see issues of public projects only @@ -82,7 +82,7 @@ class JournalTest < ActiveSupport::TestCase assert_nil journals.detect {|journal| journal.issue.project_id != 1} end - def test_visible_scope_for_admin + should_eventually "test_visible_scope_for_admin" do user = User.find(1) user.members.each(&:destroy) assert user.projects.empty?