2012-01-30 20:39:34 +00:00
|
|
|
# -*- encoding : utf-8 -*-
|
2011-12-15 09:38:40 +00:00
|
|
|
shared_examples_for 'projects user with reader rights' do
|
|
|
|
it_should_behave_like 'user with rights to view projects'
|
|
|
|
|
|
|
|
it 'should be able to fork project' do
|
|
|
|
post :fork, :id => @project.id
|
|
|
|
response.should redirect_to(project_path(Project.last))
|
2011-11-29 14:36:51 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2011-12-28 02:57:42 +00:00
|
|
|
shared_examples_for 'projects user with admin rights' do
|
2011-11-29 14:36:51 +00:00
|
|
|
it 'should be able to perform update action' do
|
2011-12-05 09:29:17 +00:00
|
|
|
put :update, {:id => @project.id}.merge(@update_params)
|
2011-11-29 14:36:51 +00:00
|
|
|
response.should redirect_to(project_path(@project))
|
|
|
|
end
|
|
|
|
end
|
2011-12-15 09:38:40 +00:00
|
|
|
|
|
|
|
shared_examples_for 'user with rights to view projects' do
|
|
|
|
it 'should be able to perform index action' do
|
|
|
|
get :index
|
|
|
|
response.should render_template(:index)
|
|
|
|
end
|
|
|
|
end
|