Commit dcb67951 authored by Dylan Griffith's avatar Dylan Griffith

Make assertions about runner_type in spec/requests/api/runner_spec.rb

parent 67f25c62
...@@ -40,6 +40,7 @@ describe API::Runner do ...@@ -40,6 +40,7 @@ describe API::Runner do
expect(json_response['token']).to eq(runner.token) expect(json_response['token']).to eq(runner.token)
expect(runner.run_untagged).to be true expect(runner.run_untagged).to be true
expect(runner.token).not_to eq(registration_token) expect(runner.token).not_to eq(registration_token)
expect(runner).to be_instance_type
end end
context 'when project token is used' do context 'when project token is used' do
...@@ -50,8 +51,10 @@ describe API::Runner do ...@@ -50,8 +51,10 @@ describe API::Runner do
expect(response).to have_gitlab_http_status 201 expect(response).to have_gitlab_http_status 201
expect(project.runners.size).to eq(1) expect(project.runners.size).to eq(1)
expect(Ci::Runner.first.token).not_to eq(registration_token) runner = Ci::Runner.first
expect(Ci::Runner.first.token).not_to eq(project.runners_token) 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
end end
...@@ -63,8 +66,10 @@ describe API::Runner do ...@@ -63,8 +66,10 @@ describe API::Runner do
expect(response).to have_http_status 201 expect(response).to have_http_status 201
expect(group.runners.size).to eq(1) expect(group.runners.size).to eq(1)
expect(Ci::Runner.first.token).not_to eq(registration_token) runner = Ci::Runner.first
expect(Ci::Runner.first.token).not_to eq(group.runners_token) 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 end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment