Removed some generate! calls.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9079 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-03-04 12:29:52 +00:00
parent 7dbc3e4774
commit 1b923819e8
4 changed files with 7 additions and 7 deletions

View File

@ -70,7 +70,7 @@ class VersionsControllerTest < ActionController::TestCase
end
def test_index_showing_subprojects_versions
@subproject_version = Version.generate!(:project => Project.find(3))
@subproject_version = Version.create!(:project => Project.find(3), :name => "Subproject version")
get :index, :project_id => 1, :with_subprojects => 1
assert_response :success
assert_template 'index'

View File

@ -22,7 +22,7 @@ class ApiTest::DisabledRestApiTest < ActionController::IntegrationTest
def test_with_a_valid_api_token
@user = User.generate_with_protected!
@token = Token.generate!(:user => @user, :action => 'api')
@token = Token.create!(:user => @user, :action => 'api')
get "/news.xml?key=#{@token.value}"
assert_response :unauthorized
@ -47,7 +47,7 @@ class ApiTest::DisabledRestApiTest < ActionController::IntegrationTest
def test_with_valid_token_http_authentication
@user = User.generate_with_protected!
@token = Token.generate!(:user => @user, :action => 'api')
@token = Token.create!(:user => @user, :action => 'api')
get "/news.xml", nil, credentials(@token.value, 'X')
assert_response :unauthorized

View File

@ -387,9 +387,9 @@ class ApiTest::IssuesTest < ActionController::IntegrationTest
context "with subtasks" do
setup do
@c1 = Issue.generate!(:status_id => 1, :subject => "child c1", :tracker_id => 1, :project_id => 1, :parent_issue_id => 1)
@c2 = Issue.generate!(:status_id => 1, :subject => "child c2", :tracker_id => 1, :project_id => 1, :parent_issue_id => 1)
@c3 = Issue.generate!(:status_id => 1, :subject => "child c3", :tracker_id => 1, :project_id => 1, :parent_issue_id => @c1.id)
@c1 = Issue.create!(:status_id => 1, :subject => "child c1", :tracker_id => 1, :project_id => 1, :author_id => 1, :parent_issue_id => 1)
@c2 = Issue.create!(:status_id => 1, :subject => "child c2", :tracker_id => 1, :project_id => 1, :author_id => 1, :parent_issue_id => 1)
@c3 = Issue.create!(:status_id => 1, :subject => "child c3", :tracker_id => 1, :project_id => 1, :author_id => 1, :parent_issue_id => @c1.id)
end
context ".xml" do

View File

@ -56,7 +56,7 @@ class WikiTest < ActiveSupport::TestCase
def test_find_page_with_backslashes
wiki = Wiki.find(1)
page = WikiPage.generate!(:wiki => wiki, :title => '2009\\02\\09')
page = WikiPage.create!(:wiki => wiki, :title => '2009\\02\\09')
assert_equal page, wiki.find_page('2009\\02\\09')
end