Move CP test with invalid project test to spec

pull/1432/head
Hagen Schink 11 years ago
parent b9123622d4
commit e73a68280f
  1. 6
      spec/controllers/copy_projects_controller_spec.rb
  2. 6
      test/functional/copy_projects_controller_test.rb

@ -53,6 +53,12 @@ describe CopyProjectsController do
it { expect(response).to render_template('copy_from_settings') } it { expect(response).to render_template('copy_from_settings') }
end end
describe "copy_from_settings without valid project" do
before { get 'copy_project' }
it { expect(response.code).to eq('404') }
end
describe 'copy_from_settings permissions' do describe 'copy_from_settings permissions' do
def fetch def fetch
get 'copy_project', :id => project.id, :coming_from => :settings get 'copy_project', :id => project.id, :coming_from => :settings

@ -46,12 +46,6 @@ class CopyProjectsControllerTest < ActionController::TestCase
Setting.default_language = 'en' Setting.default_language = 'en'
end end
def test_copy_without_project
@request.session[:user_id] = 1 # admin
get :copy_project
assert_response 404
end
context "POST :copy" do context "POST :copy" do
should "TODO: test the rest of the method" should "TODO: test the rest of the method"

Loading…
Cancel
Save