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
path: root/spec
diff options
context:
space:
mode:
authorDylan Griffith <dyl.griffith@gmail.com>2018-05-03 10:45:09 +0300
committerDylan Griffith <dyl.griffith@gmail.com>2018-05-03 10:45:09 +0300
commitdcb67951a817db262ddcd3b777fafc4e1995fc04 (patch)
treebb843d0ccb1e2459078bdfe080c29612c63f7ab7 /spec
parent67f25c6259553e30e921de3d4d72d3e97d06d327 (diff)
Make assertions about runner_type in spec/requests/api/runner_spec.rb
Diffstat (limited to 'spec')
-rw-r--r--spec/requests/api/runner_spec.rb13
1 files changed, 9 insertions, 4 deletions
diff --git a/spec/requests/api/runner_spec.rb b/spec/requests/api/runner_spec.rb
index 5ea110b4d82..27f5dff7901 100644
--- a/spec/requests/api/runner_spec.rb
+++ b/spec/requests/api/runner_spec.rb
@@ -40,6 +40,7 @@ describe API::Runner do
expect(json_response['token']).to eq(runner.token)
expect(runner.run_untagged).to be true
expect(runner.token).not_to eq(registration_token)
+ expect(runner).to be_instance_type
end
context 'when project token is used' do
@@ -50,8 +51,10 @@ describe API::Runner do
expect(response).to have_gitlab_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)
+ runner = Ci::Runner.first
+ expect(runner.token).not_to eq(registration_token)
+ expect(runner.token).not_to eq(project.runners_token)
+ expect(runner).to be_project_type
end
end
@@ -63,8 +66,10 @@ describe API::Runner do
expect(response).to have_http_status 201
expect(group.runners.size).to eq(1)
- expect(Ci::Runner.first.token).not_to eq(registration_token)
- expect(Ci::Runner.first.token).not_to eq(group.runners_token)
+ runner = Ci::Runner.first
+ expect(runner.token).not_to eq(registration_token)
+ expect(runner.token).not_to eq(group.runners_token)
+ expect(runner).to be_group_type
end
end
end