summaryrefslogtreecommitdiffstats
path: root/test/integration
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-03-04 12:29:52 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-03-04 12:29:52 +0000
commit1b923819e8305bfe324c9c59e745f61c9c49ef06 (patch)
tree3acd758bc119e68b2c41dcfb9d6b35d163d4d64b /test/integration
parent7dbc3e4774f2c405a7f2784c93160066a6c88303 (diff)
downloadredmine-1b923819e8305bfe324c9c59e745f61c9c49ef06.tar.gz
redmine-1b923819e8305bfe324c9c59e745f61c9c49ef06.zip
Removed some generate! calls.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9079 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/api_test/disabled_rest_api_test.rb4
-rw-r--r--test/integration/api_test/issues_test.rb6
2 files changed, 5 insertions, 5 deletions
diff --git a/test/integration/api_test/disabled_rest_api_test.rb b/test/integration/api_test/disabled_rest_api_test.rb
index 8683846f0..5ec1f22b9 100644
--- a/test/integration/api_test/disabled_rest_api_test.rb
+++ b/test/integration/api_test/disabled_rest_api_test.rb
@@ -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
diff --git a/test/integration/api_test/issues_test.rb b/test/integration/api_test/issues_test.rb
index 1c6e49b17..4445a000d 100644
--- a/test/integration/api_test/issues_test.rb
+++ b/test/integration/api_test/issues_test.rb
@@ -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