diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/requests/api/runner_spec.rb | 3 | ||||
-rw-r--r-- | spec/requests/ci/api/runners_spec.rb | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/spec/requests/api/runner_spec.rb b/spec/requests/api/runner_spec.rb index 15d458e0795..d50fe80b36a 100644 --- a/spec/requests/api/runner_spec.rb +++ b/spec/requests/api/runner_spec.rb @@ -39,6 +39,7 @@ describe API::Runner do expect(json_response['id']).to eq(runner.id) expect(json_response['token']).to eq(runner.token) expect(runner.run_untagged).to be true + expect(runner.token).not_to eq(registration_token) end context 'when project token is used' do @@ -49,6 +50,8 @@ describe API::Runner do expect(response).to have_http_status 201 expect(project.runners.size).to eq(1) + expect(Ci::Runner.first.token).not_to eq(registration_token) + expect(Ci::Runner.first.token).not_to eq(project.runners_token) end end end diff --git a/spec/requests/ci/api/runners_spec.rb b/spec/requests/ci/api/runners_spec.rb index 8719313783e..d50cdfdc2d6 100644 --- a/spec/requests/ci/api/runners_spec.rb +++ b/spec/requests/ci/api/runners_spec.rb @@ -18,6 +18,7 @@ describe Ci::API::Runners do it 'creates runner with default values' do expect(response).to have_http_status 201 expect(Ci::Runner.first.run_untagged).to be true + expect(Ci::Runner.first.token).not_to eq(registration_token) end end @@ -74,6 +75,8 @@ describe Ci::API::Runners do it 'creates runner' do expect(response).to have_http_status 201 expect(project.runners.size).to eq(1) + expect(Ci::Runner.first.token).not_to eq(registration_token) + expect(Ci::Runner.first.token).not_to eq(project.runners_token) end end |