Test copy redirects back

pull/1432/head
Hagen Schink 11 years ago
parent 223494f746
commit 272b9c9bc1
  1. 5
      spec/controllers/copy_projects_controller_spec.rb

@ -30,12 +30,15 @@ require File.expand_path('../../spec_helper', __FILE__)
describe CopyProjectsController do
let(:current_user) { FactoryGirl.create(:admin) }
let(:redirect_path) { "source_project_settings" }
let(:permission) { :copy_projects }
let(:project) { FactoryGirl.create(:project, :is_public => false) }
before do
User.stub(:current).and_return current_user
request.env['HTTP_REFERER'] = redirect_path
end
describe "copy_from_settings uses correct project to copy from" do
@ -66,7 +69,7 @@ describe CopyProjectsController do
end
it { assigns(:project).should_not == project }
it { expect(response).to redirect_to(redirect_path) }
end
describe 'copy permissions' do

Loading…
Cancel
Save