Creates a new board when project does not have one

parent 76499374
class Projects::BoardsController < Projects::ApplicationController
def show
Boards::CreateService.new(project).execute
respond_to do |format|
format.html
end
......
......@@ -10,6 +10,10 @@ describe Projects::BoardsController do
end
describe 'GET #show' do
it 'creates a new board when project does not have one' do
expect { get :show, namespace_id: project.namespace.to_param, project_id: project.to_param }.to change(Board, :count).by(1)
end
it 'renders HTML template' do
get :show, namespace_id: project.namespace.to_param, project_id: project.to_param
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment