OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/spec/controllers/my_projects_overview_contro...

46 lines
1.0 KiB

13 years ago
require File.dirname(__FILE__) + '/../spec_helper'
describe MyProjectsOverviewsController do
13 years ago
before :each do
@controller.stub!(:set_localization)
@controller.should_receive(:authorize)
13 years ago
@role = FactoryGirl.create(:non_member)
@user = FactoryGirl.create(:admin)
13 years ago
User.stub!(:current).and_return @user
@params = {}
end
let(:project) { FactoryGirl.create(:project) }
13 years ago
describe 'index' do
let(:params) { { "id" => project.id.to_s } }
describe "WHEN calling the page" do
integrate_views
before do
get 'index', params
end
13 years ago
it 'renders the overview page' do
response.should be_success
response.should render_template 'index'
end
13 years ago
end
describe "WHEN calling the page
WHEN providing a jump parameter" do
before do
params["jump"] = "issues"
get 'index', params
end
it { response.should redirect_to({ :controller => "issues", :action => "index", :project_id => project }) }
13 years ago
end
end
end