#345: updated collaborators_controller_spec
This commit is contained in:
parent
9cb6056675
commit
36dd7b5e62
|
@ -24,7 +24,7 @@ shared_context "collaborators controller" do
|
|||
role: 'reader'
|
||||
} if @group
|
||||
@create_params = {
|
||||
owner_name: @project.owner.uname, project_name: @project.name,
|
||||
owner_with_name: "#{@project.owner.uname}/#{@project.name}",
|
||||
format: :json
|
||||
}
|
||||
@update_params = @create_params.merge(collaborator: {role: 'reader'})
|
||||
|
@ -33,7 +33,7 @@ end
|
|||
|
||||
shared_examples_for 'project admin user' do
|
||||
it 'should be able to view collaborators list' do
|
||||
get :index, owner_name: @project.owner.uname, project_name: @project.name
|
||||
get :index, owner_with_name: "#{@project.owner.uname}/#{@project.name}"
|
||||
response.should be_success
|
||||
end
|
||||
|
||||
|
@ -60,7 +60,7 @@ end
|
|||
|
||||
shared_examples_for 'user with no rights for this project' do
|
||||
it 'should not be able to view collaborators list' do
|
||||
get :index, owner_name: @project.owner.uname, project_name: @project.name
|
||||
get :index, owner_with_name: "#{@project.owner.uname}/#{@project.name}"
|
||||
response.should redirect_to(forbidden_path)
|
||||
end
|
||||
|
||||
|
@ -83,7 +83,7 @@ describe Projects::CollaboratorsController do
|
|||
set_session_for(User.new)
|
||||
end
|
||||
it 'should not be able to perform index action' do
|
||||
get :index, owner_name: @project.owner.uname, project_name: @project.name
|
||||
get :index, owner_with_name: "#{@project.owner.uname}/#{@project.name}"
|
||||
response.should redirect_to(new_user_session_path)
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue