diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2016-09-13 00:36:16 +0200 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2016-09-13 17:44:20 +0200 |
commit | 5b8613b8e657051a6a9199d417dd300f2fd9a281 (patch) | |
tree | 94ce0ef2cd4fe009a2fc91b50cb8be41046dd72f /spec/requests/ci/api/builds_spec.rb | |
parent | f369e62a16d5f7c529f277c1125ee99c85dfc56d (diff) | |
download | gitlab-ce-5b8613b8e657051a6a9199d417dd300f2fd9a281.tar.gz |
Add test with inactive error use case for 'POST /ci/api/v1/builds/register.json'
Diffstat (limited to 'spec/requests/ci/api/builds_spec.rb')
-rw-r--r-- | spec/requests/ci/api/builds_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/requests/ci/api/builds_spec.rb b/spec/requests/ci/api/builds_spec.rb index 9b808457dc0..780bd7f2859 100644 --- a/spec/requests/ci/api/builds_spec.rb +++ b/spec/requests/ci/api/builds_spec.rb @@ -158,6 +158,16 @@ describe Ci::API::API do end end + context 'when runner is paused' do + let(:inactive_runner) { create(:ci_runner, :inactive, token: "InactiveRunner") } + + before do + register_builds inactive_runner.token + end + + it { expect(response).to have_http_status 404 } + end + def register_builds(token = runner.token, **params) post ci_api("/builds/register"), params.merge(token: token), { 'User-Agent' => user_agent } end |