diff options
author | Rémy Coutable <remy@rymai.me> | 2019-04-23 15:05:17 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-04-23 15:05:17 +0300 |
commit | d369d6924076547327b6d2200762b5cb40b57e31 (patch) | |
tree | d2b090d54f7a62092fa29a9df87de271ea67e76f /spec/services | |
parent | dcb23df2f0194ab264d57cdc0b7c8ff1cc9c0e99 (diff) | |
parent | 97cd3e8c5ac3f96169b9b82e78b90f54ca1fcb22 (diff) |
Merge branch 'upgrade-to-rails-5-1' into 'master'
Upgrade Rails to 5.1
See merge request gitlab-org/gitlab-ce!27480
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/projects/update_service_spec.rb | 2 | ||||
-rw-r--r-- | spec/services/users/destroy_service_spec.rb | 4 | ||||
-rw-r--r-- | spec/services/users/migrate_to_ghost_user_service_spec.rb | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/spec/services/projects/update_service_spec.rb b/spec/services/projects/update_service_spec.rb index c37147e7d3b..5ad30b58511 100644 --- a/spec/services/projects/update_service_spec.rb +++ b/spec/services/projects/update_service_spec.rb @@ -440,6 +440,8 @@ describe Projects::UpdateService do context 'when auto devops is set to instance setting' do before do project.create_auto_devops!(enabled: nil) + project.reload + allow(project.auto_devops).to receive(:previous_changes).and_return('enabled' => true) end diff --git a/spec/services/users/destroy_service_spec.rb b/spec/services/users/destroy_service_spec.rb index 1c79af34538..4a5f4509a7b 100644 --- a/spec/services/users/destroy_service_spec.rb +++ b/spec/services/users/destroy_service_spec.rb @@ -210,6 +210,8 @@ describe Users::DestroyService do describe "calls the before/after callbacks" do it 'of project_members' do + expect_any_instance_of(ProjectMember).to receive(:run_callbacks).with(:find).once + expect_any_instance_of(ProjectMember).to receive(:run_callbacks).with(:initialize).once expect_any_instance_of(ProjectMember).to receive(:run_callbacks).with(:destroy).once service.execute(user) @@ -219,6 +221,8 @@ describe Users::DestroyService do group_member = create(:group_member) group_member.group.group_members.create(user: user, access_level: 40) + expect_any_instance_of(GroupMember).to receive(:run_callbacks).with(:find).once + expect_any_instance_of(GroupMember).to receive(:run_callbacks).with(:initialize).once expect_any_instance_of(GroupMember).to receive(:run_callbacks).with(:destroy).once service.execute(user) diff --git a/spec/services/users/migrate_to_ghost_user_service_spec.rb b/spec/services/users/migrate_to_ghost_user_service_spec.rb index b808fa6d91a..40206775aed 100644 --- a/spec/services/users/migrate_to_ghost_user_service_spec.rb +++ b/spec/services/users/migrate_to_ghost_user_service_spec.rb @@ -80,7 +80,7 @@ describe Users::MigrateToGhostUserService do context "when record migration fails with a rollback exception" do before do - expect_any_instance_of(MergeRequest::ActiveRecord_Associations_CollectionProxy) + expect_any_instance_of(ActiveRecord::Associations::CollectionProxy) .to receive(:update_all).and_raise(ActiveRecord::Rollback) end |