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:
parent
436ab28443
commit
8a1f26617d
|
@ -344,7 +344,7 @@ class UserTest < ActiveSupport::TestCase
|
||||||
wiki_content = WikiContent.create!(
|
wiki_content = WikiContent.create!(
|
||||||
:text => 'foo',
|
:text => 'foo',
|
||||||
:author_id => 2,
|
: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'
|
wiki_content.text = 'bar'
|
||||||
assert_difference 'WikiContent::Version.count' do
|
assert_difference 'WikiContent::Version.count' do
|
||||||
|
|
|
@ -23,7 +23,7 @@ class WikiTest < ActiveSupport::TestCase
|
||||||
fixtures :projects, :wikis, :wiki_pages, :wiki_contents, :wiki_content_versions
|
fixtures :projects, :wikis, :wiki_pages, :wiki_contents, :wiki_content_versions
|
||||||
|
|
||||||
def test_create
|
def test_create
|
||||||
wiki = Wiki.new(:project => Project.find(2))
|
wiki = Wiki.new(:project => Project.find(3))
|
||||||
assert !wiki.save
|
assert !wiki.save
|
||||||
assert_equal 1, wiki.errors.count
|
assert_equal 1, wiki.errors.count
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue