Commit 18297e20 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'add-roulette-json' into 'master'

Add a roulette.json file to

See merge request !19132
parents d768f7ae 7825c617
Pipeline #47306163 passed with stages
in 12 minutes and 30 seconds
- # Filter out members who can't possibly review anything
- team = { |member| member.type == 'person' && member.gitlab && && member.projects }
= { |member| { username: member.gitlab, name:, projects: member.projects } }.to_json
require 'spec_helper'
describe 'the generated /roulette.json response' do
before do
visit '/roulette.json'
subject(:json_response) { JSON.parse(page.body) }
it 'has the right content-type' do
expect(page.response_headers['Content-Type']).to eq('application/json')
it 'includes name for all people' do all(include('name' => be_a(String)))
it 'includes username for all people' do all(include('username' => be_a(String)))
# Changing this spec means that the reviewer roulette part of GitLab's Danger
# integration will also need to change
it 'represents dmitriy correctly' do
dmitriy = json_response[0]
expect(dmitriy).to include(
'username' => 'dzaporozhets',
'name' => "Dmitriy 'DZ' Zaporozhets",
'projects' => include(
'gitlab-ce' => 'maintainer backend',
'gitlab-ee' => 'maintainer backend'
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