Don't create duplicate wikis in test (#15420).

Patch by George Gensure.

git-svn-id: http://svn.redmine.org/redmine/trunk@12317 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2013-11-23 09:13:48 +00:00
parent 436ab28443
commit 8a1f26617d
2 changed files with 2 additions and 2 deletions

View File

@ -344,7 +344,7 @@ class UserTest < ActiveSupport::TestCase
wiki_content = WikiContent.create!(
:text => 'foo',
:author_id => 2,
:page => WikiPage.create!(:title => 'Foo', :wiki => Wiki.create!(:project_id => 1, :start_page => 'Start'))
:page => WikiPage.create!(:title => 'Foo', :wiki => Wiki.create!(:project_id => 3, :start_page => 'Start'))
)
wiki_content.text = 'bar'
assert_difference 'WikiContent::Version.count' do

View File

@ -23,7 +23,7 @@ class WikiTest < ActiveSupport::TestCase
fixtures :projects, :wikis, :wiki_pages, :wiki_contents, :wiki_content_versions
def test_create
wiki = Wiki.new(:project => Project.find(2))
wiki = Wiki.new(:project => Project.find(3))
assert !wiki.save
assert_equal 1, wiki.errors.count