adapt projects controller test

pull/495/head
jwollert 11 years ago
parent 5610e6573b
commit 5d3f39aaa0
  1. 11
      test/functional/projects_controller_test.rb

@ -435,19 +435,18 @@ class ProjectsControllerTest < ActionController::TestCase
def test_copy_with_project
@request.session[:user_id] = 1 # admin
get :copy, :id => 1
get :copy_project, :id => 1, :coming_from => "settings"
assert_response :success
assert_template 'copy'
assert_template 'copy_from_settings'
assert assigns(:project)
assert_equal Project.find(1).description, assigns(:project).description
assert_nil assigns(:project).id
assert_nil assigns(:copy_project).id
end
def test_copy_without_project
@request.session[:user_id] = 1 # admin
get :copy
assert_response :redirect
assert_redirected_to :controller => 'admin', :action => 'projects'
get :copy_project
assert_response 404
end
context "POST :copy" do

Loading…
Cancel
Save