2011-03-09 19:27:51 +00:00
|
|
|
require 'spec_helper'
|
2011-12-15 09:38:40 +00:00
|
|
|
|
2013-03-06 12:17:42 +00:00
|
|
|
shared_examples_for 'platform user with reader rights' do
|
|
|
|
include_examples 'platform user with show rights'
|
|
|
|
|
|
|
|
[:members, :advisories].each do |action|
|
|
|
|
it 'should be able to perform advisories action' do
|
2014-01-21 04:51:49 +00:00
|
|
|
get action, id: @platform.id
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(response).to render_template(action)
|
|
|
|
expect(response).to be_success
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
shared_examples_for 'platform user with owner rights' do
|
|
|
|
|
|
|
|
context 'platform user with update rights' do
|
|
|
|
before do
|
2014-01-21 04:51:49 +00:00
|
|
|
put :update, {platform: {description: 'new description'}, id: @platform.id}
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
it 'should be able to perform update action' do
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(response).to redirect_to(platform_path(@platform))
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
it 'ensures that platform has been updated' do
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(@platform.reload.description).to eq 'new description'
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
end
|
2011-12-15 09:38:40 +00:00
|
|
|
|
2013-06-26 10:00:51 +01:00
|
|
|
context 'perform change_visibility action' do
|
|
|
|
before do
|
|
|
|
@visibility = @platform.visibility
|
2014-01-21 04:51:49 +00:00
|
|
|
post :change_visibility, id: @platform.id
|
2013-06-26 10:00:51 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
it 'should be able to perform action' do
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(response).to redirect_to(platform_path(@platform))
|
2013-06-26 10:00:51 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
it 'ensures that visibility of platform has been changed' do
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(@platform.reload.visibility).to_not eq @visibility
|
2013-06-26 10:00:51 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2013-03-06 12:17:42 +00:00
|
|
|
context 'platform user with destroy rights for main platforms only' do
|
|
|
|
it 'should be able to perform destroy action for main platform' do
|
2014-01-21 04:51:49 +00:00
|
|
|
delete :destroy, id: @platform.id
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(response).to redirect_to(platforms_path)
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
it 'ensures that main platform has been destroyed' do
|
2015-04-02 23:27:08 +01:00
|
|
|
expect do
|
|
|
|
delete :destroy, id: @platform.id
|
|
|
|
end.to change(Platform, :count).by(-1)
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
it 'should not be able to perform destroy action for personal platform' do
|
2014-01-21 04:51:49 +00:00
|
|
|
delete :destroy, id: @personal_platform.id
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(response).to_not be_success
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
it 'ensures that personal platform has not been destroyed' do
|
2015-04-02 23:27:08 +01:00
|
|
|
expect do
|
|
|
|
delete :destroy, id: @personal_platform.id
|
|
|
|
end.to_not change(Platform, :count)
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
2011-12-15 09:38:40 +00:00
|
|
|
end
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
2011-12-15 09:38:40 +00:00
|
|
|
|
2013-03-06 12:17:42 +00:00
|
|
|
shared_examples_for 'platform user without owner rights' do
|
|
|
|
context 'platform user without update rights' do
|
|
|
|
before do
|
2014-01-21 04:51:49 +00:00
|
|
|
put :update, {platform: {description: 'new description'}, id: @platform.id}
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
it 'should not be able to perform update action' do
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(response).to_not be_success
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
it 'ensures that platform has not been updated' do
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(@platform.reload.description).to_not eq 'new description'
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
2011-12-15 09:38:40 +00:00
|
|
|
end
|
|
|
|
|
2013-06-26 10:00:51 +01:00
|
|
|
context 'perform change_visibility action' do
|
|
|
|
before do
|
|
|
|
@visibility = @platform.visibility
|
2014-01-21 04:51:49 +00:00
|
|
|
post :change_visibility, id: @platform.id
|
2013-06-26 10:00:51 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
it 'should not be able to perform action' do
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(response).to_not be_success
|
2013-06-26 10:00:51 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
it 'ensures that visibility of platform has not been changed' do
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(@platform.reload.visibility).to eq @visibility
|
2013-06-26 10:00:51 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2013-03-06 12:17:42 +00:00
|
|
|
context 'platform user without destroy rights' do
|
|
|
|
it 'should not be able to perform destroy action for main platform' do
|
2014-01-21 04:51:49 +00:00
|
|
|
delete :destroy, id: @platform.id
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(response).to_not be_success
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
it 'ensures that main platform has not been destroyed' do
|
2015-04-02 23:27:08 +01:00
|
|
|
expect do
|
|
|
|
delete :destroy, id: @platform.id
|
|
|
|
end.to_not change(Platform, :count)
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
it 'should not be able to perform destroy action for personal platform' do
|
2014-01-21 04:51:49 +00:00
|
|
|
delete :destroy, id: @personal_platform.id
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(response).to_not be_success
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
it 'ensures that personal platform has not been destroyed' do
|
2015-04-02 23:27:08 +01:00
|
|
|
expect do
|
|
|
|
delete :destroy, id: @personal_platform.id
|
|
|
|
end.to_not change(Platform, :count)
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
2011-12-15 09:38:40 +00:00
|
|
|
end
|
2013-03-06 12:17:42 +00:00
|
|
|
|
2011-12-15 09:38:40 +00:00
|
|
|
end
|
|
|
|
|
2013-03-06 12:17:42 +00:00
|
|
|
shared_examples_for 'platform user with member rights' do
|
|
|
|
|
|
|
|
context 'platform user with add_member rights' do
|
|
|
|
let(:member) { FactoryGirl.create(:user) }
|
|
|
|
before do
|
2014-01-21 04:51:49 +00:00
|
|
|
put :add_member, {member_id: member.id, id: @platform.id}
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
it 'should be able to perform add_member action' do
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(response).to redirect_to(members_platform_path(@platform))
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
it 'ensures that new member has been added to platform' do
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(@platform.members).to include(member)
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
2011-12-15 09:38:40 +00:00
|
|
|
end
|
|
|
|
|
2013-03-06 12:17:42 +00:00
|
|
|
context 'platform user with remove_members rights' do
|
|
|
|
let(:member) { FactoryGirl.create(:user) }
|
|
|
|
before do
|
|
|
|
@platform.add_member(member)
|
2014-11-24 21:16:51 +00:00
|
|
|
post :remove_members, members: [member.id], id: @platform.id
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
it 'should be able to perform remove_members action' do
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(response).to redirect_to(members_platform_path(@platform))
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
it 'ensures that member has been removed from platform' do
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(@platform.members).to_not include(member)
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
shared_examples_for 'platform user without member rights' do |guest = false|
|
|
|
|
|
|
|
|
context 'platform user without add_member rights' do
|
|
|
|
let(:member) { FactoryGirl.create(:user) }
|
|
|
|
before do
|
2014-01-21 04:51:49 +00:00
|
|
|
put :add_member, {member_id: member.id, id: @platform.id}
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
it 'should not be able to perform add_member action' do
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(response).to redirect_to(guest ? new_user_session_path : forbidden_path)
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
it 'ensures that new member has not been added to platform' do
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(@platform.members).to_not include(member)
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
2012-09-07 10:41:49 +01:00
|
|
|
end
|
|
|
|
|
2013-03-06 12:17:42 +00:00
|
|
|
context 'platform user without remove_members rights' do
|
|
|
|
let(:member) { FactoryGirl.create(:user) }
|
|
|
|
before do
|
|
|
|
@platform.add_member(member)
|
2014-11-24 21:16:51 +00:00
|
|
|
post :remove_members, members: [member.id], id: @platform.id
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
it 'should not be able to perform remove_members action' do
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(response).to redirect_to(guest ? new_user_session_path : forbidden_path)
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
it 'ensures that member has not been removed from platform' do
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(@platform.members).to include(member)
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
2012-09-07 10:41:49 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
2013-03-06 12:17:42 +00:00
|
|
|
|
|
|
|
shared_examples_for 'platform user without global admin rights' do
|
|
|
|
context 'should not be able to perform clear action' do
|
|
|
|
it 'for personal platform' do
|
2014-01-21 04:51:49 +00:00
|
|
|
put :clear, id: @personal_platform.id
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(response).to_not be_success
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
it 'for main platform' do
|
2014-01-21 04:51:49 +00:00
|
|
|
put :clear, id: @platform.id
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(response).to_not be_success
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
context 'should not be able to perform clone action' do
|
|
|
|
it 'for personal platform' do
|
2014-01-21 04:51:49 +00:00
|
|
|
get :clone, id: @personal_platform.id
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(response).to_not be_success
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
it 'for main platform' do
|
2014-01-21 04:51:49 +00:00
|
|
|
get :clone, id: @platform.id
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(response).to_not be_success
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
end
|
2012-09-07 10:41:49 +01:00
|
|
|
|
|
|
|
it 'should not be able to perform new action' do
|
|
|
|
get :new
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(response).to_not be_success
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
[:create, :make_clone].each do |action|
|
|
|
|
context "platform user without #{action} rights" do
|
|
|
|
it "should not be able to perform #{action} action" do
|
|
|
|
post action, clone_or_create_params
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(response).to_not be_success
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
it "ensures that platform has not been #{action}d" do
|
2015-04-02 23:27:08 +01:00
|
|
|
expect do
|
|
|
|
post action, clone_or_create_params
|
|
|
|
end.to_not change(Platform, :count)
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
end
|
2012-09-07 10:41:49 +01:00
|
|
|
end
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
2012-09-07 10:41:49 +01:00
|
|
|
|
2013-03-06 12:17:42 +00:00
|
|
|
shared_examples_for 'platform user with reader rights for hidden platform' do
|
|
|
|
before(:each) do
|
|
|
|
@platform.update_column(:visibility, 'hidden')
|
2011-12-15 09:38:40 +00:00
|
|
|
end
|
2013-03-06 12:17:42 +00:00
|
|
|
|
|
|
|
it_should_behave_like 'platform user with show rights'
|
2011-12-15 09:38:40 +00:00
|
|
|
end
|
2011-03-09 19:27:51 +00:00
|
|
|
|
2013-03-06 12:17:42 +00:00
|
|
|
shared_examples_for 'platform user without reader rights for hidden platform' do
|
2011-11-28 13:28:29 +00:00
|
|
|
before(:each) do
|
2013-03-06 12:17:42 +00:00
|
|
|
@platform.update_column(:visibility, 'hidden')
|
|
|
|
end
|
|
|
|
|
|
|
|
[:show, :members].each do |action|
|
|
|
|
it "should not be able to perform #{ action } action" do
|
2014-01-21 04:51:49 +00:00
|
|
|
get action, id: @platform.id
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(response).to redirect_to(forbidden_path)
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
shared_examples_for 'platform user with show rights' do
|
|
|
|
it 'should be able to perform show action' do
|
2014-01-21 04:51:49 +00:00
|
|
|
get :show, id: @platform.id
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(response).to render_template(:show)
|
|
|
|
expect(assigns(:platform)).to eq @platform
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2015-02-19 01:12:08 +00:00
|
|
|
describe Platforms::PlatformsController, type: :controller do
|
2015-02-19 01:53:47 +00:00
|
|
|
let(:clone_or_create_params) { {id: @platform.id, platform: {description: 'new description', name: 'new_name', owner_id: @user.id, distrib_type: APP_CONFIG['distr_types'].first, default_branch: 'new_name'}} }
|
2013-03-06 12:17:42 +00:00
|
|
|
before do
|
2012-05-16 16:29:28 +01:00
|
|
|
stub_symlink_methods
|
2011-12-12 07:51:39 +00:00
|
|
|
|
2012-03-29 21:34:22 +01:00
|
|
|
@platform = FactoryGirl.create(:platform)
|
2014-01-21 04:51:49 +00:00
|
|
|
@personal_platform = FactoryGirl.create(:platform, platform_type: 'personal')
|
|
|
|
|
2012-03-29 21:34:22 +01:00
|
|
|
@user = FactoryGirl.create(:user)
|
2012-08-31 19:48:06 +01:00
|
|
|
end
|
2011-03-09 19:27:51 +00:00
|
|
|
|
2011-11-28 13:28:29 +00:00
|
|
|
context 'for guest' do
|
|
|
|
|
2013-03-06 12:17:42 +00:00
|
|
|
it "should not be able to perform index action" do
|
|
|
|
get :index
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(response).to redirect_to(new_user_session_path)
|
2011-11-28 13:28:29 +00:00
|
|
|
end
|
2012-08-31 23:00:39 +01:00
|
|
|
|
2012-09-07 10:41:49 +01:00
|
|
|
[:show, :members, :advisories].each do |action|
|
2014-01-21 04:51:49 +00:00
|
|
|
it "should not be able to perform #{ action } action", anonymous_access: false do
|
|
|
|
get action, id: @platform
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(response).to redirect_to(new_user_session_path)
|
2012-08-31 23:00:39 +01:00
|
|
|
end
|
|
|
|
end
|
2012-09-07 10:41:49 +01:00
|
|
|
|
2013-03-06 12:17:42 +00:00
|
|
|
it_should_behave_like 'platform user with show rights' if APP_CONFIG['anonymous_access']
|
|
|
|
it_should_behave_like 'platform user without reader rights for hidden platform' if APP_CONFIG['anonymous_access']
|
|
|
|
it_should_behave_like 'platform user without member rights', true
|
|
|
|
it_should_behave_like 'platform user without owner rights'
|
|
|
|
it_should_behave_like 'platform user without global admin rights'
|
2011-11-28 13:28:29 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
context 'for global admin' do
|
2013-03-06 12:17:42 +00:00
|
|
|
before do
|
|
|
|
@admin = FactoryGirl.create(:admin)
|
|
|
|
http_login(@admin)
|
2011-11-28 13:28:29 +00:00
|
|
|
end
|
|
|
|
|
2013-03-06 12:17:42 +00:00
|
|
|
it_should_behave_like 'platform user with reader rights'
|
|
|
|
it_should_behave_like 'platform user with reader rights for hidden platform'
|
|
|
|
it_should_behave_like 'platform user with member rights'
|
|
|
|
it_should_behave_like 'platform user with owner rights'
|
2012-09-07 10:41:49 +01:00
|
|
|
|
2013-03-06 12:17:42 +00:00
|
|
|
it "should be able to perform new action" do
|
2014-01-21 04:51:49 +00:00
|
|
|
get :new, id: @platform
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(response).to render_template(:new)
|
2011-11-28 13:28:29 +00:00
|
|
|
end
|
|
|
|
|
2013-03-06 12:17:42 +00:00
|
|
|
it "should be able to perform clone action" do
|
2014-01-21 04:51:49 +00:00
|
|
|
get :clone, id: @platform
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(response).to render_template(:clone)
|
2011-11-28 13:28:29 +00:00
|
|
|
end
|
|
|
|
|
2013-03-06 12:17:42 +00:00
|
|
|
[:make_clone, :create].each do |action|
|
|
|
|
context "with #{action} rights" do
|
|
|
|
before do
|
|
|
|
clone_or_create_params[:platform][:owner_id] = @admin.id
|
|
|
|
end
|
|
|
|
it "should be able to perform #{action} action" do
|
|
|
|
post action, clone_or_create_params
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(response).to redirect_to(platform_path(Platform.last))
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
it "ensures that platform has been #{action}d" do
|
2015-04-02 23:27:08 +01:00
|
|
|
expect do
|
|
|
|
post action, clone_or_create_params
|
|
|
|
end.to change(Platform, :count).by(1)
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
|
|
|
end
|
2011-11-28 13:28:29 +00:00
|
|
|
end
|
2013-03-06 12:17:42 +00:00
|
|
|
end
|
2011-11-28 13:28:29 +00:00
|
|
|
|
2013-03-06 12:17:42 +00:00
|
|
|
context 'for owner user' do
|
|
|
|
before do
|
|
|
|
http_login(@user)
|
|
|
|
@platform.owner = @user; @platform.save
|
2014-03-18 09:31:01 +00:00
|
|
|
create_relation(@platform, @user, 'admin')
|
2011-12-11 16:00:50 +00:00
|
|
|
end
|
|
|
|
|
2013-03-06 12:17:42 +00:00
|
|
|
it_should_behave_like 'platform user with reader rights'
|
|
|
|
it_should_behave_like 'platform user with reader rights for hidden platform'
|
|
|
|
it_should_behave_like 'platform user with member rights'
|
|
|
|
it_should_behave_like 'platform user with owner rights'
|
|
|
|
it_should_behave_like 'platform user without global admin rights'
|
2011-11-28 13:28:29 +00:00
|
|
|
end
|
|
|
|
|
2013-03-06 12:17:42 +00:00
|
|
|
context 'for member of platform' do
|
|
|
|
before do
|
|
|
|
http_login(@user)
|
|
|
|
@platform.add_member(@user)
|
|
|
|
@personal_platform.add_member(@user)
|
2011-11-28 13:28:29 +00:00
|
|
|
end
|
|
|
|
|
2013-03-06 12:17:42 +00:00
|
|
|
it_should_behave_like 'platform user with reader rights'
|
|
|
|
it_should_behave_like 'platform user with reader rights for hidden platform'
|
|
|
|
it_should_behave_like 'platform user with member rights'
|
|
|
|
it_should_behave_like 'platform user without owner rights'
|
|
|
|
it_should_behave_like 'platform user without global admin rights'
|
2011-11-28 13:28:29 +00:00
|
|
|
end
|
|
|
|
|
2013-07-17 16:33:58 +01:00
|
|
|
context 'for member of repository' do
|
|
|
|
before do
|
|
|
|
http_login(@user)
|
2014-01-21 04:51:49 +00:00
|
|
|
repository = FactoryGirl.create(:repository, platform: @platform)
|
2013-07-17 16:33:58 +01:00
|
|
|
repository.add_member(@user)
|
2014-01-21 04:51:49 +00:00
|
|
|
personal_repository = FactoryGirl.create(:repository, platform: @personal_platform)
|
2013-07-17 16:33:58 +01:00
|
|
|
personal_repository.add_member(@user)
|
|
|
|
end
|
|
|
|
|
|
|
|
it_should_behave_like 'platform user with reader rights'
|
|
|
|
it_should_behave_like 'platform user with reader rights for hidden platform'
|
|
|
|
it_should_behave_like 'platform user without member rights'
|
|
|
|
it_should_behave_like 'platform user without owner rights'
|
|
|
|
it_should_behave_like 'platform user without global admin rights'
|
|
|
|
end
|
|
|
|
|
2013-03-06 12:17:42 +00:00
|
|
|
context 'for simple user' do
|
|
|
|
before do
|
|
|
|
http_login(@user)
|
2011-11-28 13:28:29 +00:00
|
|
|
end
|
|
|
|
|
2013-03-06 12:17:42 +00:00
|
|
|
it "should be able to perform index action" do
|
|
|
|
get :index
|
2015-04-02 23:27:08 +01:00
|
|
|
expect(response).to render_template(:index)
|
2011-11-28 13:28:29 +00:00
|
|
|
end
|
2013-03-06 12:17:42 +00:00
|
|
|
|
|
|
|
it_should_behave_like 'platform user with reader rights'
|
|
|
|
it_should_behave_like 'platform user without reader rights for hidden platform'
|
|
|
|
it_should_behave_like 'platform user without member rights'
|
|
|
|
it_should_behave_like 'platform user without owner rights'
|
|
|
|
it_should_behave_like 'platform user without global admin rights'
|
2011-11-28 13:28:29 +00:00
|
|
|
end
|
2013-03-06 12:17:42 +00:00
|
|
|
|
2011-03-09 19:27:51 +00:00
|
|
|
end
|