]> source.dussan.org Git - redmine.git/commitdiff
Changed assertion to see what issues contains (#19106).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 14 Feb 2015 11:35:19 +0000 (11:35 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sat, 14 Feb 2015 11:35:19 +0000 (11:35 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@14005 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/issue_test.rb

index 768899856af7500c0d1b8b3ed9d1a9155673cab3..33635e7a5795a81d20b6840a5c282e93edab8ef4 100644 (file)
@@ -307,7 +307,7 @@ class IssueTest < ActiveSupport::TestCase
     Member.create!(:principal => user.groups.first, :project_id => 1, :role_ids => [2])
     Role.non_member.remove_permission!(:view_issues)
 
-    issue = Issue.create(:project_id => 1, :tracker_id => 1, :author_id => 3,
+    issue = Issue.create!(:project_id => 1, :tracker_id => 1, :author_id => 3,
       :status_id => 1, :priority => IssuePriority.all.first,
       :subject => 'Assignment test',
       :assigned_to => user.groups.first,
@@ -321,7 +321,7 @@ class IssueTest < ActiveSupport::TestCase
     Role.find(2).update_attribute :issues_visibility, 'own'
     issues = Issue.visible(User.find(8)).to_a
     assert issues.any?
-    assert issues.include?(issue)
+    assert_include issue, issues
   end
 
   def test_visible_scope_for_admin