lets work_packages_controller be less planning_element specific

pull/243/head
Jens Ulferts 11 years ago
parent 3f58c33790
commit 49d378ab3a
  1. 4
      app/controllers/work_packages_controller.rb
  2. 4
      spec/controllers/work_packages_controller_spec.rb

@ -17,7 +17,7 @@ class WorkPackagesController < ApplicationController
include ExtendedHTTP
menu_item :planning_elements
model_object PlanningElement
model_object WorkPackage
before_filter :disable_api
before_filter :find_model_object_and_project,
@ -42,7 +42,7 @@ class WorkPackagesController < ApplicationController
def work_package
@work_package ||= begin
wp = PlanningElement.includes(:project)
wp = WorkPackage.includes(:project)
.find_by_id(params[:id])
wp && wp.visible?(current_user) ?

@ -103,10 +103,6 @@ describe WorkPackagesController do
get 'show', :id => planning_element.id
end
it 'assigns the planning_element' do
assigns(:planning_element).should == planning_element
end
it 'renders the show builder template' do
response.should render_template('work_packages/show', :formats => ["html"], :layout => :base)
end

Loading…
Cancel
Save