diff --git a/spec/controllers/autocompletes_controller_spec.rb b/spec/controllers/autocompletes_controller_spec.rb index 858855631..dda0e08a5 100644 --- a/spec/controllers/autocompletes_controller_spec.rb +++ b/spec/controllers/autocompletes_controller_spec.rb @@ -9,8 +9,8 @@ describe AutocompletesController do set_session_for user end - it 'should be able to perform autocomplete_group_uname action' do - get :autocomplete_group_uname + it 'should be able to perform autocomplete_user_or_group action' do + get :autocomplete_user_or_group response.should be_success end @@ -66,7 +66,7 @@ describe AutocompletesController do end [ - :autocomplete_group_uname, + :autocomplete_user_or_group, :autocomplete_user_uname, :autocomplete_extra_build_list, :autocomplete_extra_repositories diff --git a/spec/controllers/groups/members_controller_spec.rb b/spec/controllers/groups/members_controller_spec.rb index 9b27b94c5..0bb9eb0ff 100644 --- a/spec/controllers/groups/members_controller_spec.rb +++ b/spec/controllers/groups/members_controller_spec.rb @@ -7,9 +7,9 @@ describe Groups::MembersController do @user = @group.owner set_session_for @user @another_user = FactoryGirl.create(:user) - @add_params = {group_id: @group, user_uname: @another_user.uname} - @remove_params = {group_id: @group, user_remove: {"#{@group.owner.id}"=>["1"]}} - @update_params = {group_id: @group, user: {"#{@group.owner.id}"=>'reader'}} + @add_params = {group_id: @group, member_id: @another_user.id} + @remove_params = {group_id: @group, members: [@group.owner.id]} + @update_params = {group_id: @group, member_id: @group.owner.id, role: :reader} end context 'for owner user' do @@ -61,7 +61,7 @@ describe Groups::MembersController do it 'should not set read role to owner group' do post :update, @update_params Relation.by_target(@group).by_actor(@user).first.role.should eql('admin') - response.should redirect_to(group_members_path(@group)) + response.should redirect_to(forbidden_path) end end diff --git a/spec/controllers/projects/hooks_controller_spec.rb b/spec/controllers/projects/hooks_controller_spec.rb index 4b320472c..2f2180161 100644 --- a/spec/controllers/projects/hooks_controller_spec.rb +++ b/spec/controllers/projects/hooks_controller_spec.rb @@ -120,7 +120,7 @@ describe Projects::HooksController do end context 'group member user with reader role' do - before { create_actor_relation(@group, @auser, 'reader') } + before { create_actor_relation(@group, @user, 'reader') } it_should_behave_like 'hooks user without project admin rights'