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
@@ -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