summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-15 06:09:11 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-15 06:09:11 +0000
commita7d1525878904f2f8326baf1c8108f2204ac50cb (patch)
treeda855edafb086adebe33c5eed462d753b58e2836 /spec
parentb69f406585ff64b1c5140ebba775cc754fabb358 (diff)
downloadgitlab-ce-a7d1525878904f2f8326baf1c8108f2204ac50cb.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/runtime_spec.rb8
-rw-r--r--spec/services/ci/stop_environments_service_spec.rb10
2 files changed, 14 insertions, 4 deletions
diff --git a/spec/lib/gitlab/runtime_spec.rb b/spec/lib/gitlab/runtime_spec.rb
index f6e8ad8ae79..56df73161b4 100644
--- a/spec/lib/gitlab/runtime_spec.rb
+++ b/spec/lib/gitlab/runtime_spec.rb
@@ -97,4 +97,12 @@ describe Gitlab::Runtime do
it_behaves_like "valid runtime", :geo_log_cursor, 1
end
+
+ context "rails runner" do
+ before do
+ stub_const('::Rails::Command::RunnerCommand', double('::Rails::Command::RunnerCommand'))
+ end
+
+ it_behaves_like "valid runtime", :rails_runner, 1
+ end
end
diff --git a/spec/services/ci/stop_environments_service_spec.rb b/spec/services/ci/stop_environments_service_spec.rb
index 88f2f5618c2..19a6bcc307f 100644
--- a/spec/services/ci/stop_environments_service_spec.rb
+++ b/spec/services/ci/stop_environments_service_spec.rb
@@ -217,18 +217,20 @@ describe Ci::StopEnvironmentsService do
context 'when user does not have a permission to play the stop action' do
before do
- Ci::Build.find_by_ref('review/feature-2').update_column(:user_id, nil)
+ project.team.truncate
end
it 'tracks the exception' do
- deployable = Ci::Build.find_by_ref('review/feature-2')
-
expect(Gitlab::ErrorTracking)
.to receive(:track_error)
- .with(Gitlab::Access::AccessDeniedError, deployable_id: deployable.id).once
+ .with(Gitlab::Access::AccessDeniedError, anything).twice
subject
end
+
+ after do
+ project.add_developer(user)
+ end
end
end