Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-07 03:07:51 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-07 03:07:51 +0300
commit4e375367b78bb44bd00957522cd9fc3e6d403fef (patch)
tree059b1ce541e4128bf03683407d7b5bbbc2094ed5 /spec/lib/gitlab/checks
parent99ddca0d88f1e4e49d61b1aa9d41b5785528d1dc (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/checks')
-rw-r--r--spec/lib/gitlab/checks/branch_check_spec.rb4
-rw-r--r--spec/lib/gitlab/checks/change_access_spec.rb20
2 files changed, 18 insertions, 6 deletions
diff --git a/spec/lib/gitlab/checks/branch_check_spec.rb b/spec/lib/gitlab/checks/branch_check_spec.rb
index 71b64a3b9df..7cc1722dfd4 100644
--- a/spec/lib/gitlab/checks/branch_check_spec.rb
+++ b/spec/lib/gitlab/checks/branch_check_spec.rb
@@ -32,7 +32,9 @@ describe Gitlab::Checks::BranchCheck do
end
it 'raises an error if the user is not allowed to merge to protected branches' do
- expect_any_instance_of(Gitlab::Checks::MatchingMergeRequest).to receive(:match?).and_return(true)
+ expect_next_instance_of(Gitlab::Checks::MatchingMergeRequest) do |instance|
+ expect(instance).to receive(:match?).and_return(true)
+ end
expect(user_access).to receive(:can_merge_to_branch?).and_return(false)
expect(user_access).to receive(:can_push_to_branch?).and_return(false)
diff --git a/spec/lib/gitlab/checks/change_access_spec.rb b/spec/lib/gitlab/checks/change_access_spec.rb
index 3a8e8f67e16..dfc8c59fd74 100644
--- a/spec/lib/gitlab/checks/change_access_spec.rb
+++ b/spec/lib/gitlab/checks/change_access_spec.rb
@@ -14,31 +14,41 @@ describe Gitlab::Checks::ChangeAccess do
end
it 'calls pushes checks' do
- expect_any_instance_of(Gitlab::Checks::PushCheck).to receive(:validate!)
+ expect_next_instance_of(Gitlab::Checks::PushCheck) do |instance|
+ expect(instance).to receive(:validate!)
+ end
subject.exec
end
it 'calls branches checks' do
- expect_any_instance_of(Gitlab::Checks::BranchCheck).to receive(:validate!)
+ expect_next_instance_of(Gitlab::Checks::BranchCheck) do |instance|
+ expect(instance).to receive(:validate!)
+ end
subject.exec
end
it 'calls tags checks' do
- expect_any_instance_of(Gitlab::Checks::TagCheck).to receive(:validate!)
+ expect_next_instance_of(Gitlab::Checks::TagCheck) do |instance|
+ expect(instance).to receive(:validate!)
+ end
subject.exec
end
it 'calls lfs checks' do
- expect_any_instance_of(Gitlab::Checks::LfsCheck).to receive(:validate!)
+ expect_next_instance_of(Gitlab::Checks::LfsCheck) do |instance|
+ expect(instance).to receive(:validate!)
+ end
subject.exec
end
it 'calls diff checks' do
- expect_any_instance_of(Gitlab::Checks::DiffCheck).to receive(:validate!)
+ expect_next_instance_of(Gitlab::Checks::DiffCheck) do |instance|
+ expect(instance).to receive(:validate!)
+ end
subject.exec
end